diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 1a089d11cee..644a6b9e673 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -23,19 +23,19 @@ jobs: steps: - name: Check out code into the Go module directory - uses: actions/checkout@v4 + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 with: fetch-depth: 0 - name: Set up Go - uses: actions/setup-go@v5 + uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0 with: go-version-file: waf-check/go.mod - name: golangci-lint - uses: golangci/golangci-lint-action@v7 + uses: golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 # v8.0.0 with: - version: v2.0 + version: v2.5 args: --issues-exit-code=1 --timeout 10m only-new-issues: false working-directory: waf-check diff --git a/.github/workflows/waf-check.yaml b/.github/workflows/waf-check.yaml index ee71b5ed9fb..1b4b6ffe03e 100644 --- a/.github/workflows/waf-check.yaml +++ b/.github/workflows/waf-check.yaml @@ -30,18 +30,18 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out code into the Go module directory - uses: actions/checkout@v4 + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 with: fetch-depth: 0 - - uses: actions/setup-go@v5 + - uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0 with: go-version-file: waf-check/go.mod - name: Split dateset run: | cd waf-check && go build -o waf-check ./waf-check -download -batch -dir-count 6 - - uses: actions/upload-artifact@v4 + - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 name: Upload dataset in artifact with: name: waf-check-dataset @@ -64,15 +64,15 @@ jobs: ] steps: - name: Check out code into the Go module directory - uses: actions/checkout@v4 - - uses: actions/download-artifact@v4 + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 + - uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0 with: name: waf-check-dataset path: waf-check/dataset/ name: Download dataset from artifact - - uses: actions/setup-go@v4 + - uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0 with: - go-version: "1.22" + go-version: "1.25" - name: Install requirements run: | sudo apt install libre2-dev @@ -103,14 +103,14 @@ jobs: - name: Build and Run Waf Check run: | cd waf-check && go build -o waf-check && ./waf-check -dataset "dataset/${{ matrix.dataset_folder }}" - - uses: actions/upload-artifact@v4 + - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 if: failure() name: Upload dataset in artifact with: name: waf-check-result path: ./waf-check/output/ retention-days: 1 - - uses: geekyeggo/delete-artifact@v4 + - uses: geekyeggo/delete-artifact@f275313e70c08f6120db482d7a6b98377786765b # v5.1.0 if: always() with: token: ${{ secrets.GITHUB_TOKEN }} diff --git a/waf-check/.golangci.yml b/waf-check/.golangci.yml index a0d0079b356..93b05cfe8ae 100644 --- a/waf-check/.golangci.yml +++ b/waf-check/.golangci.yml @@ -27,6 +27,9 @@ linters: - err113 # Go linter to check the errors handling expressions - tagliatelle # Checks the struct tags. - varnamelen # checks that the length of a variable's name matches its scope + - funcorder + - noinlineerr + - wsl_v5 settings: diff --git a/waf-check/go.mod b/waf-check/go.mod index 6543d9433c1..2292e84de9b 100644 --- a/waf-check/go.mod +++ b/waf-check/go.mod @@ -1,5 +1,5 @@ module waf-check -go 1.24 +go 1.25 require gopkg.in/yaml.v2 v2.4.0 diff --git a/waf-check/main.go b/waf-check/main.go index 2feee584799..90e41f2df94 100644 --- a/waf-check/main.go +++ b/waf-check/main.go @@ -66,5 +66,5 @@ func main() { log.Fatal(err.Error()) } - fmt.Printf("everything went well!\n") + fmt.Print("everything went well!\n") }