From 532dce7b7c8d336d6a955a6a3fbba667ac59500d Mon Sep 17 00:00:00 2001 From: Anton-Latukha Date: Sat, 25 Dec 2021 00:29:41 +0200 Subject: [PATCH 1/5] CI: add hlint workflow --- .github/workflows/hlint.yml | 17 +++++++++++++++++ .github/workflows/test.yml | 6 +----- 2 files changed, 18 insertions(+), 5 deletions(-) create mode 100644 .github/workflows/hlint.yml diff --git a/.github/workflows/hlint.yml b/.github/workflows/hlint.yml new file mode 100644 index 0000000000..f599ea5289 --- /dev/null +++ b/.github/workflows/hlint.yml @@ -0,0 +1,17 @@ +name: "Checking with HLint" + +on: + pull_request: + branches: + - '**' + +jobs: + build10: + name: "HLint check" + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - name: "HLint via ./fmt.sh" + run: | + ./fmt.sh diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3dafcdf2dd..50f07d0438 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -154,11 +154,7 @@ jobs: ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}- ${{ env.cache-name }}-${{ runner.os }}- - - run: cabal update - - - name: "HLint via ./fmt.sh" - run: | - ./fmt.sh + - run: cabal v2-update # repeating builds to workaround segfaults in windows and ghc-8.8.4 - name: Build From da203241583a768e28a5b00c0183c108a4f7ed08 Mon Sep 17 00:00:00 2001 From: Anton-Latukha Date: Sat, 25 Dec 2021 01:29:20 +0200 Subject: [PATCH 2/5] CI: hlint: update to action This is what `fmt.sh` runs. --- .github/workflows/hlint.yml | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/.github/workflows/hlint.yml b/.github/workflows/hlint.yml index f599ea5289..27cfbecfd9 100644 --- a/.github/workflows/hlint.yml +++ b/.github/workflows/hlint.yml @@ -1,4 +1,4 @@ -name: "Checking with HLint" +name: "HLint check" on: pull_request: @@ -7,11 +7,17 @@ on: jobs: build10: - name: "HLint check" + name: "Run" runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - name: "HLint via ./fmt.sh" - run: | - ./fmt.sh + - name: 'Installing' + uses: rwe/actions-hlint-setup@v1 + with: + version: '3.3.5' + + - name: 'Checking code' + uses: rwe/actions-hlint-run@v1 + with: + path: '[ "--with-group=extra", "--hint=ghcide/.hlint.yaml", "ghcide/src", "ghcide/exe", "ghcide/bench/lib", "ghcide/bench/exe", "ghcide/bench/hist", "shake-bench/src", "ghcide/test/exe" ]' From 661a293522ac6336ad191d020926776f0ffdea86 Mon Sep 17 00:00:00 2001 From: Anton-Latukha Date: Sat, 25 Dec 2021 01:32:00 +0200 Subject: [PATCH 3/5] CI: hlint: use version 3.3.1 --- .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 27cfbecfd9..f4fc3ec04a 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.3.5' + version: '3.3.1' - name: 'Checking code' uses: rwe/actions-hlint-run@v1 From 7239dfb31f3b878842bfa6fd6b9bd2ae62e9d034 Mon Sep 17 00:00:00 2001 From: Anton-Latukha Date: Sat, 25 Dec 2021 01:34:02 +0200 Subject: [PATCH 4/5] CI: hlint: fix args --- .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 f4fc3ec04a..693e3431e0 100644 --- a/.github/workflows/hlint.yml +++ b/.github/workflows/hlint.yml @@ -20,4 +20,5 @@ jobs: - name: 'Checking code' uses: rwe/actions-hlint-run@v1 with: - path: '[ "--with-group=extra", "--hint=ghcide/.hlint.yaml", "ghcide/src", "ghcide/exe", "ghcide/bench/lib", "ghcide/bench/exe", "ghcide/bench/hist", "shake-bench/src", "ghcide/test/exe" ]' + hlint-bin: "hlint --with-group=extra --hint=ghcide/.hlint.yaml" + path: '[ "ghcide/src", "ghcide/exe", "ghcide/bench/lib", "ghcide/bench/exe", "ghcide/bench/hist", "shake-bench/src", "ghcide/test/exe" ]' From bf4e6fb523b440109fcda1f220beb6cf6ed18d8a Mon Sep 17 00:00:00 2001 From: Anton-Latukha Date: Sat, 25 Dec 2021 13:56:06 +0200 Subject: [PATCH 5/5] CI: hlint: use 3.3.4 --- .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 693e3431e0..7bc8125c75 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.3.1' + version: '3.3.4' - name: 'Checking code' uses: rwe/actions-hlint-run@v1