Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
18 changes: 9 additions & 9 deletions .github/workflows/waf-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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 }}
Expand Down
3 changes: 3 additions & 0 deletions waf-check/.golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down
2 changes: 1 addition & 1 deletion waf-check/go.mod
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module waf-check

go 1.24
go 1.25

require gopkg.in/yaml.v2 v2.4.0
2 changes: 1 addition & 1 deletion waf-check/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,5 +66,5 @@ func main() {
log.Fatal(err.Error())
}

fmt.Printf("everything went well!\n")
fmt.Print("everything went well!\n")
}
Loading