We don't need the hack anymore #590
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
pull_request: | |
branches: main | |
workflow_dispatch: | |
paths: [code/drasil-**, .github/workflows/Lint.yaml, code/scripts/**] | |
name: Linter | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
defaults: | |
run: | |
shell: bash | |
working-directory: code | |
jobs: | |
linter: | |
name: "Linter" | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
# Prepare more specific paths filters | |
- uses: dorny/[email protected] | |
id: filter | |
with: | |
filters: | | |
hs: | |
- '**/*.hs' | |
- '**/*.lhs' | |
sh: | |
- '**/*.sh' | |
# If a [l]hs file was edited, then run HLint | |
- name: 'Set up HLint' | |
if: ${{ steps.filter.outputs.hs == 'true' }} | |
uses: haskell-actions/hlint-setup@v2 | |
with: # DO NOT MODIFY THE BELOW LINE MANUALLY -- code/scripts/update_default_stackage.sh is in charge of this! | |
version: '3.6.1' # HLINT VERSION TIED TO CURRENT TARGET (LTS-22.31) | |
- name: 'Run HLint' | |
if: ${{ steps.filter.outputs.hs == 'true' }} | |
uses: haskell-actions/hlint-run@v2 | |
with: # The custom hlint-bin is necessary because we need to inject options to hlint, since hlint-run does not support it yet, see: https://github.com/haskell-actions/hlint-run/issues/20 | |
hlint-bin: hlint --hint=code/.hlint.yaml | |
path: code/ | |
fail-on: status | |
# If a sh script was edited, then run shellcheck | |
- name: "Run ShellCheck" | |
if: ${{ steps.filter.outputs.sh == 'true' }} | |
uses: ludeeus/[email protected] | |
with: | |
scandir: './code/scripts' |