v0.7.0 31c7fae

.golangci.yml RawHistoryFolder

1version: "2"
2
3linters:
4  default: none
5  enable:
6    - bodyclose          # checks whether HTTP response body is closed successfully
7    - copyloopvar       # detects places where loop variables are copied
8# - depguard          # checks for unwanted dependencies (disabled for CLI apps)
9    - dogsled           # checks assignments with too many blank identifiers
10    - dupl              # tool for code clone detection
11    - errcheck          # checking for unchecked errors
12    - errorlint         # errorlint is a linter for that can be used to find code that will cause problems with the error wrapping scheme
13    - funlen            # tool for detection of long functions
14    - gocheckcompilerdirectives # validates go compiler directive comments (//go:)
15# - gochecknoinits    # checks that no init functions are present in Go code (disabled for CLI apps)
16    - goconst           # finds repeated strings that could be replaced by a constant
17    - gocritic          # provides diagnostics that check for bugs, performance and style issues
18    - gocyclo           # computes and checks the cyclomatic complexity of functions
19    - godox             # tool for detection of FIXME, TODO and other comment keywords
20    - mnd               # detects magic numbers
21    - goprintffuncname  # checks that printf-like functions are named with `f` at the end
22    - gosec             # inspects source code for security problems
23    - govet             # examines Go source code and reports suspicious constructs
24    - ineffassign       # detects when assignments to existing variables are not used
25    - lll               # reports long lines
26    - misspell          # finds commonly misspelled English words in comments
27    - nakedret          # finds naked returns in functions greater than a specified function length
28    - nolintlint        # reports ill-formed or insufficient nolint directives
29    - revive            # fast, configurable, extensible, flexible, and beautiful linter for Go
30    - staticcheck       # advanced Go linter
31    - testifylint       # checks usage of github.com/stretchr/testify
32    - unconvert         # removes unnecessary type conversions
33    - unparam           # reports unused function parameters
34    - unused            # checks for unused constants, variables, functions and types
35    - whitespace        # detects leading and trailing whitespace
36
37linters-settings:
38  dupl:
39    threshold: 100
40  funlen:
41    lines: -1  # don't check line count
42    statements: 50
43  goconst:
44    min-len: 2
45    min-occurrences: 3
46  gocritic:
47    enabled-tags:
48      - diagnostic
49      - experimental
50      - opinionated
51      - performance
52      - style
53    disabled-checks:
54      - dupImport
55      - ifElseChain
56      - octalLiteral
57      - whyNoLint
58  gocyclo:
59    min-complexity: 15
60  godox:
61    keywords:
62      - FIXME
63      - TODO
64      - BUG
65  mnd:
66    checks:
67      - argument
68      - case
69      - condition
70      - return
71    ignored-numbers:
72      - '0'
73      - '1'
74      - '2'
75      - '3'
76    ignored-functions:
77      - strings.SplitN
78  govet:
79    enable:
80      - nilness
81      - shadow
82  errorlint:
83    asserts: false
84  lll:
85    line-length: 120
86  misspell:
87    locale: US
88  nolintlint:
89    allow-unused: false
90    require-explanation: true
91    require-specific: true
92  revive:
93    rules:
94      - name: indent-error-flow
95      - name: unused-parameter
96      - name: unused-receiver
97
98issues:
99  exclude-rules:
100    # Exclude some linters from running on tests files
101    - path: _test\.go
102      linters:
103        - dupl
104        - mnd
105        - lll
106        - funlen
107    
108    # Exclude SQLC generated files from linting
109    - path: internal/db/.*\.sql\.go
110      linters:
111        - all
112    
113    # Exclude SQLC generated models from some linters
114    - path: internal/db/models\.go
115      linters:
116        - unused
117        - deadcode
118    
119    # Allow long lines in generated code
120    - path: internal/db/
121      linters:
122        - lll
123
124run:
125  timeout: 5m
126  modules-download-mode: readonly

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 8

Tags 42

↑↓ moveenter openesc close