-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3664 from JacquesCarette/shellcheckScripts
Shellcheck scripts in Lint workflow
- Loading branch information
Showing
11 changed files
with
128 additions
and
52 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ on: | |
pull_request: | ||
branches: main | ||
workflow_dispatch: | ||
paths: [code/drasil-**, .github/workflows/Lint.yaml] | ||
paths: [code/drasil-**, .github/workflows/Lint.yaml, code/scripts/**] | ||
name: Linter | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
|
@@ -13,25 +13,47 @@ defaults: | |
working-directory: code | ||
jobs: | ||
linter: | ||
name: "HLint" | ||
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 | ||
# Once we update our LTS, we can remove this step, see "Inputs": https://github.com/haskell-actions/hlint-setup | ||
- name: 'Install HLint system dependencies' | ||
if: ${{ steps.filter.outputs.hs == 'true' }} | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y libtinfo5 | ||
- 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.4.1' # HLINT VERSION TIED TO CURRENT TARGET (LTS-20.26) | ||
|
||
- 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' |
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
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
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
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
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
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
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
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
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
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