Skip to content

haskell/actions/hlint-run doesn't detect .hlint.yaml file in working directory #12

Open
@benrbray

Description

@benrbray

(cloned from haskell/actions#277 by request of @andreasabel )

Question

Does the hlint-run action currently support .hlint.yaml files? If so, what is the recommended way to pass the .hlint.yaml file to the action?

Details

I have the following project structure:

/
├─ .github/
│  ├─ workflows/
│  │  ├─ hlint.yaml
├─ project/
│  ├─ src/
│  ├─ project.cabal
│  ├─ .hlint.yml

Here is .hlint.yaml:

- ignore: {name: Redundant bracket}

Here is (the relevant part of) .github/workflows/hlint.yaml:

name: build
on:
  push:
    branches: [main]
  pull_request:
    branches: [main]

permissions:
  contents: read

jobs:  
  hlint:
    runs-on: ubuntu-latest
    defaults:
      run:
        working-directory: project
    steps:
    - uses: actions/checkout@v3

    - name: 'Set up HLint'
      uses: haskell/actions/hlint-setup@v2

    - name: 'Run HLint'
      uses: haskell/actions/hlint-run@v2
      with:
        path: .
        fail-on: never

In CI, the hlint-run action is successful, but I still get a "redundant bracket" warning. Locally, running hlint automatically detects the .hlint.yaml file and suppresses the warning.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions