From 000c97a83754440127273a54f368f9ed20eb5720 Mon Sep 17 00:00:00 2001 From: Fendor Date: Thu, 14 Dec 2023 10:20:39 +0100 Subject: [PATCH 1/4] Don't run hlint on testdata directories --- .github/workflows/hlint.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/hlint.yml b/.github/workflows/hlint.yml index 62d8742039..9b629457c7 100644 --- a/.github/workflows/hlint.yml +++ b/.github/workflows/hlint.yml @@ -20,7 +20,8 @@ jobs: - name: 'Checking code' uses: rwe/actions-hlint-run@v2 with: - hlint-bin: "hlint --with-group=extra" + # Ignore testdata directories to silence hlint warnings for test data files. + hlint-bin: "hlint --with-group=extra --ignore-glob='**/testdata/**/*.hs' --ignore-glob='**/test/data/**/*.hs'" fail-on: error path: . From 6db1bc9b1aa12826cf311dd2319e2a6db8289233 Mon Sep 17 00:00:00 2001 From: Fendor Date: Wed, 10 Jan 2024 17:25:17 +0100 Subject: [PATCH 2/4] Bump hlint version --- .github/workflows/hlint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/hlint.yml b/.github/workflows/hlint.yml index 9b629457c7..7cb217ed48 100644 --- a/.github/workflows/hlint.yml +++ b/.github/workflows/hlint.yml @@ -15,7 +15,7 @@ jobs: - name: 'Installing' uses: rwe/actions-hlint-setup@v1 with: - version: '3.5' + version: '3.6.1' - name: 'Checking code' uses: rwe/actions-hlint-run@v2 From 927f81188e713c6683ac9367bf0256e007ac67d1 Mon Sep 17 00:00:00 2001 From: Fendor Date: Wed, 10 Jan 2024 19:12:31 +0100 Subject: [PATCH 3/4] Remove quotes --- .github/workflows/hlint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/hlint.yml b/.github/workflows/hlint.yml index 7cb217ed48..c2b2d7bf0d 100644 --- a/.github/workflows/hlint.yml +++ b/.github/workflows/hlint.yml @@ -21,7 +21,7 @@ jobs: uses: rwe/actions-hlint-run@v2 with: # Ignore testdata directories to silence hlint warnings for test data files. - hlint-bin: "hlint --with-group=extra --ignore-glob='**/testdata/**/*.hs' --ignore-glob='**/test/data/**/*.hs'" + hlint-bin: "hlint --with-group=extra --ignore-glob=**/testdata/** --ignore-glob=**/test/data/**" fail-on: error path: . From 533c8bca3c185a342f0ab5f95ad3c58349b85424 Mon Sep 17 00:00:00 2001 From: Fendor Date: Thu, 11 Jan 2024 11:07:56 +0100 Subject: [PATCH 4/4] Ignore test data directories in .hlint.yaml --- .github/workflows/hlint.yml | 3 +-- .hlint.yaml | 4 ++++ plugins/hls-semantic-tokens-plugin/.hlint.yaml | 1 - 3 files changed, 5 insertions(+), 3 deletions(-) delete mode 100644 plugins/hls-semantic-tokens-plugin/.hlint.yaml diff --git a/.github/workflows/hlint.yml b/.github/workflows/hlint.yml index c2b2d7bf0d..11d5445c1c 100644 --- a/.github/workflows/hlint.yml +++ b/.github/workflows/hlint.yml @@ -20,8 +20,7 @@ jobs: - name: 'Checking code' uses: rwe/actions-hlint-run@v2 with: - # Ignore testdata directories to silence hlint warnings for test data files. - hlint-bin: "hlint --with-group=extra --ignore-glob=**/testdata/** --ignore-glob=**/test/data/**" + hlint-bin: "hlint --with-group=extra" fail-on: error path: . diff --git a/.hlint.yaml b/.hlint.yaml index 852b8060b0..bb2a4327ef 100644 --- a/.hlint.yaml +++ b/.hlint.yaml @@ -5,6 +5,10 @@ # To run HLint do: # $ hlint --git -j4 +# Ignore all lints in testdata directories, as they are distracting. +- ignore: { "within": '**/testdata/**' } +- ignore: { "within": '**/test/data/**' } + # Warnings currently triggered by our code - ignore: {name: "Use <$>"} - ignore: {name: "Use :"} diff --git a/plugins/hls-semantic-tokens-plugin/.hlint.yaml b/plugins/hls-semantic-tokens-plugin/.hlint.yaml deleted file mode 100644 index 072cf81614..0000000000 --- a/plugins/hls-semantic-tokens-plugin/.hlint.yaml +++ /dev/null @@ -1 +0,0 @@ -- ignore: { "within": 'test/testdata/*.hs' }