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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
97 changes: 60 additions & 37 deletions scraper/.golangci.yml
Original file line number Diff line number Diff line change
@@ -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$