Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: rename Id to ID and simplify some code #101

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
89 changes: 89 additions & 0 deletions .golangci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
run:
timeout: 10m
linters:
enable:
- errcheck
- goimports
- revive
- govet
- staticcheck
- misspell
- gocritic
- sqlclosecheck
- rowserrcheck
- nilerr
- godot
- mirror
- bodyclose

issues:
exclude:
- Rollback
- fmt.Printf

linters-settings:
# goimports:
# Organize imports so that local packages come after third-party packages.
# local-prefixes: github.com/NJUPT-SAST/sastoj
revive:
# Enable all rules but selectively disable ones that are too restrictive.
enable-all-rules: true
rules:
# Rules description see revive documentation: https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md
# - name: line-length-limit
# arguments: [120] # Set a reasonable line length limit
# Disable other rules that are too strict.
- name: line-length-limit
disabled: true
- name: file-header
disabled: true
- name: function-length
disabled: true
- name: max-public-structs
disabled: true
- name: function-result-limit
disabled: true
- name: banned-characters
disabled: true
- name: argument-limit
disabled: true
- name: cognitive-complexity
disabled: true
- name: cyclomatic
disabled: true
- name: confusing-results
disabled: true
- name: add-constant
disabled: true
- name: flag-parameter
disabled: true
- name: nested-structs
disabled: true
- name: import-shadowing
disabled: true
- name: early-return
disabled: true
- name: use-any
disabled: true
- name: exported
disabled: true
- name: unhandled-error
disabled: true
- name: if-return
disabled: true
- name: max-control-nesting
disabled: true
gocritic:
# Rules description see gocritic documentation: https://go-critic.com/overview#checkers-from-the-diagnostic-group
disabled-checks:
- ifElseChain
govet:
settings:
printf: # The name of the analyzer, run `go tool vet help` to see the list of all analyzers
funcs: # Run `go tool vet help printf` to see the full configuration of `printf`.
- common.Errorf # Treat common.Errorf as a printf-style function.
enable-all: true
# Rules description see govet documentation: https://pkg.go.dev/github.com/golangci/govet
disable:
- fieldalignment
- shadow
Loading