-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* style: fixed linter errors * ci: configured GitGub Actions to run tests and linter * refactor!: renamed interface method
- Loading branch information
1 parent
77ec9b1
commit deacdd2
Showing
16 changed files
with
227 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: GitHub Actions | ||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
jobs: | ||
linter: | ||
runs-on: ubuntu-20.04 | ||
timeout-minutes: 5 | ||
steps: | ||
- name: Set up Go | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: 1.19 | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 1 | ||
- name: golangci-lint | ||
uses: golangci/golangci-lint-action@v3 | ||
with: | ||
version: v1.50 | ||
env: | ||
CGO_ENABLED: 0 | ||
tests: | ||
runs-on: ubuntu-20.04 | ||
timeout-minutes: 5 | ||
steps: | ||
- name: Set up Go | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: 1.19 | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 1 | ||
- name: Run tests | ||
run: go test -cover ./... | ||
env: | ||
CGO_ENABLED: 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
.idea | ||
.idea | ||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
linters-settings: | ||
dupl: | ||
threshold: 100 | ||
funlen: | ||
lines: 120 | ||
statements: 60 | ||
gci: | ||
local-prefixes: github.com/velmie/q2sql | ||
goconst: | ||
min-len: 2 | ||
min-occurrences: 2 | ||
gocritic: | ||
enabled-tags: | ||
- diagnostic | ||
- experimental | ||
- opinionated | ||
- performance | ||
- style | ||
gocyclo: | ||
min-complexity: 20 | ||
goimports: | ||
local-prefixes: github.com/velmie/q2sql | ||
gomnd: | ||
settings: | ||
mnd: | ||
# don't include the "operation" and "assign" | ||
checks: [argument,case,condition,return] | ||
govet: | ||
check-shadowing: true | ||
lll: | ||
line-length: 140 | ||
maligned: | ||
suggest-new: true | ||
misspell: | ||
locale: US | ||
nolintlint: | ||
allow-leading-space: true # don't require machine-readable nolint directives (i.e. with no leading space) | ||
allow-unused: false # report any unused nolint directives | ||
require-explanation: false # don't require an explanation for nolint directives | ||
require-specific: false # don't require nolint directives to be specific about which linter is being skipped | ||
|
||
linters: | ||
# please, do not use `enable-all`: it's deprecated and will be removed soon. | ||
# inverted configuration with `enable-all` and `disable` is not scalable during updates of golangci-lint | ||
disable-all: true | ||
enable: | ||
- bodyclose | ||
- depguard | ||
- dogsled | ||
- errcheck | ||
- funlen | ||
- gochecknoinits | ||
- goconst | ||
- gocyclo | ||
- gofmt | ||
- goimports | ||
- gomnd | ||
- goprintffuncname | ||
- gosec | ||
- gosimple | ||
- govet | ||
- ineffassign | ||
- lll | ||
- misspell | ||
- nakedret | ||
- nolintlint | ||
- staticcheck | ||
- stylecheck | ||
- typecheck | ||
- unconvert | ||
- unparam | ||
- unused | ||
- whitespace | ||
- asasalint | ||
- asasalint | ||
- bidichk | ||
- contextcheck | ||
- dupl | ||
- durationcheck | ||
- errchkjson | ||
- exportloopref | ||
- forbidigo | ||
- gocognit | ||
- gocritic | ||
- grouper | ||
- importas | ||
- loggercheck | ||
- maintidx | ||
- makezero | ||
- nilerr | ||
- nilnil | ||
- prealloc | ||
- reassign | ||
- tagliatelle | ||
- tenv | ||
- usestdlibvars | ||
# Unsupported because of the issue https://github.com/golangci/golangci-lint/issues/2649 | ||
# - rowserrcheck | ||
|
||
issues: | ||
# Excluding configuration per-path, per-linter, per-text and per-source | ||
exclude-rules: | ||
- path: _test\.go | ||
linters: | ||
- dupl | ||
- gomnd | ||
- funlen | ||
- gocyclo | ||
- lll | ||
- maintidx | ||
- path: expr\.go | ||
linters: | ||
- gocritic | ||
run: | ||
timeout: 5m |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.