diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1b5dbd8..694ca6b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -77,6 +77,6 @@ jobs: working-directory: ./scraper - name: Lint go - uses: golangci/golangci-lint-action@v6 + uses: golangci/golangci-lint-action@v7 with: working-directory: ./scraper diff --git a/scraper/.golangci.yml b/scraper/.golangci.yml index 0bf2569..0290f12 100644 --- a/scraper/.golangci.yml +++ b/scraper/.golangci.yml @@ -1,47 +1,70 @@ +version: "2" + run: - # Set to container quota - concurrency: 0 - timeout: 60s + # Allow multiple runners in CI allow-parallel-runners: true +# Specific linter settings linters: - enable-all: true + default: all disable: - # requires whitespaces even though for statements and assignments are common or used within loops - - wsl - # Requires nl before return - - nlreturn - # Allow unused stuff, because it's could enabled easily - - unused + # No forbidden deps + - depguard # fmt print is explicitly allowed as a script - forbidigo # Comments do not require dot or capital - godot - # No forbidden deps - - depguard - # Deprecated - - tenv + # Requires nl before return + - nlreturn + # Allow unused stuff, because it's could enabled easily + - unused + # requires whitespaces even though for statements and assignments are common or used within loops + - wsl + settings: + revive: + confidence: 0.1 + enable-all-rules: true + rules: + # Ignore formatting errors + - name: unhandled-error + arguments: + - fmt.Printf + - name: add-constant + arguments: + # Allow -1 and empty strings for checks like LastIndex != -1 + - allowInts: 0,1 + allowStrs: '""' + # Allow panics on this script + - name: deep-exit + disabled: true + - name: line-length-limit + arguments: + # 80 line length is not necessary anymore for todays standard + - 120 + - name: cognitive-complexity + arguments: + - 14 + exclusions: + generated: lax + presets: + - comments + - common-false-positives + - legacy + - std-error-handling + paths: + - third_party$ + - builtin$ + - examples$ -# Specific linter settings -linters-settings: - revive: - enable-all-rules: true - confidence: 0.1 - rules: - # Ignore formatting errors - - name: unhandled-error - arguments: - - "fmt.Printf" - - name: add-constant - arguments: - # Allow -1 and empty strings for checks like LastIndex != -1 - - allowInts: "0,1" - allowStrs: '""' - # Allow panics on this script - - name: deep-exit - disabled: true - # 80 line length is not necessary anymore for todays standard - - name: line-length-limit - arguments: [ 120 ] - - name: cognitive-complexity - arguments: [14] +formatters: + enable: + - gci + - gofmt + - gofumpt + - goimports + exclusions: + generated: lax + paths: + - third_party$ + - builtin$ + - examples$