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

Setup lint and format of Go, Proto and yaml/markdown #223

Merged
merged 41 commits into from
Nov 15, 2021
Merged
Changes from 1 commit
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
6b3114a
Run prettier
kradalby Nov 13, 2021
edfcdc4
Update lint ci file with prettier and proto
kradalby Nov 13, 2021
03b7ec6
Go format with shorter lines
kradalby Nov 13, 2021
dae34ca
Proto format
kradalby Nov 13, 2021
2634215
golangci-lint --fix
kradalby Nov 13, 2021
3ddd996
Add format make entry
kradalby Nov 13, 2021
148437f
Setup more linters and goals for golangci
kradalby Nov 13, 2021
24e0c94
Align with update golangci-lint
kradalby Nov 13, 2021
95b9f03
update buf setup
kradalby Nov 13, 2021
fa0922d
define proto dir for buf
kradalby Nov 13, 2021
b653572
Make format shuld format, not lint
kradalby Nov 13, 2021
806f0d3
Format lint
kradalby Nov 13, 2021
f94b0b5
Remove lint install, update go
kradalby Nov 13, 2021
e8726b1
Add readme note about codestyle
kradalby Nov 14, 2021
f3da299
Format readme
kradalby Nov 14, 2021
052883a
Fix merge conflict
kradalby Nov 14, 2021
1969802
Fix golanglint
kradalby Nov 14, 2021
d0ef850
Add and fix noctx linter
kradalby Nov 14, 2021
89eb13c
Add and fix nlreturn (new line return)
kradalby Nov 14, 2021
4ace54c
Move wsl, might not be feasible
kradalby Nov 14, 2021
668e958
Add and fix unconvert
kradalby Nov 14, 2021
0315f55
Add and fix nilnil
kradalby Nov 14, 2021
19cd7a4
Add and fix exhaustive
kradalby Nov 14, 2021
c9c16c7
Remove unused params or returns
kradalby Nov 14, 2021
9390348
Add and fix goconst
kradalby Nov 14, 2021
796072a
Add and fix ifshort
kradalby Nov 14, 2021
85f28a3
Remove all instances of undefined numbers (gonmd)
kradalby Nov 14, 2021
ba084b9
Lint fix integration tests
kradalby Nov 14, 2021
53ed749
Start work on making gocritic pass
kradalby Nov 14, 2021
471c0b4
Initial work eliminating one/two letter variables
kradalby Nov 14, 2021
333be80
Fix rest of var name in main code
kradalby Nov 15, 2021
8ae682b
Fix var name length in tests
kradalby Nov 15, 2021
78cfba0
Add exceptions to var name length
kradalby Nov 15, 2021
2dde124
Fix formatting
kradalby Nov 15, 2021
0c45f8d
Add and fix errorlint
kradalby Nov 15, 2021
0c005a6
Add and fix errname
kradalby Nov 15, 2021
715542a
Add and fix stylecheck (golint replacement)
kradalby Nov 15, 2021
c4d4c9c
Add and fix gosec
kradalby Nov 15, 2021
db8be91
Add and fix forbidigo
kradalby Nov 15, 2021
25b790d
Add and fix forcetypeassert
kradalby Nov 15, 2021
d673938
Get rid of dynamic errors
kradalby Nov 15, 2021
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
15 changes: 12 additions & 3 deletions .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@ linters:
# In progress
- gocritic

# TODO: approve: ok, db, id
- varnamelen

# We should strive to enable these:
- testpackage
- stylecheck
Expand All @@ -49,3 +46,15 @@ linters:
- cyclop
- nestif
- wsl # might be incompatible with gofumpt

linters-settings:
varnamelen:
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:( this will hurt

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have fixed The part that hurts

ignore-type-assert-ok: true
ignore-map-index-ok: true
ignore-names:
- err
- db
- id
- ip
- ok
- c