-
Notifications
You must be signed in to change notification settings - Fork 17
chore/linter #467
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
Merged
Merged
chore/linter #467
Changes from all commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
c0b600f
update database schema diagram
4f1f3d7
Merge branch 'main' of github.com:data-preservation-programs/singularity
d4ab4e9
devcontainers ignore
932668c
update settings for 2.x linter
6015fff
fix linting with golangci v2
parkan f04d3c8
use modern `go install` instead of GO111MODULE
parkan c38e511
modernize toolchain
parkan 1e8cba5
fix linter errors
parkan cfbcab9
make linter work on github actions
parkan 108afab
try alternate migration strategy
parkan b4accae
unused import, formatting
parkan a0ab4b1
disable linters added since 1.55.2, suppress errcheck
parkan f31e212
lint autofixes
parkan 7f88f1a
int32 for epoch is safe, auto-fixes
parkan e0f460d
update linter name for (go)err113
parkan bae794f
use core slices instead of exp/slices
parkan ce2d30e
disable lint for remaining epoch and cid/block length sites
parkan f465731
thelper fix, autofix
parkan 515c52c
suppress predeclared since that's what the param is called
parkan c522d7c
suppress recvcheck for Value() methods
parkan 9f35caa
better suppression for revcheck for Value
parkan 5d73bbe
exclude marshalling functions from recvcheck
parkan 1c4a325
always pass server by pointer, clear last recvcheck
parkan 25ca84b
add nil check
parkan 7ed4aa2
suppress file perms errors for docs
parkan 398367d
warn on and handle unknown/-1 file size in assembler
parkan ea47335
suppress remaining overflow warnings :(
parkan 5472869
tidy
parkan 66575a8
infer go version from go.mod for sake of sanity
parkan cc18ff4
generate
parkan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 |
---|---|---|
|
@@ -15,4 +15,4 @@ concurrency: | |
|
||
jobs: | ||
go-check: | ||
uses: ipdxco/unified-github-workflows/.github/workflows/[email protected].17 | ||
uses: ipdxco/unified-github-workflows/.github/workflows/[email protected].22 |
This file contains hidden or 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 hidden or 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 |
---|---|---|
|
@@ -21,6 +21,8 @@ | |
/baga* | ||
singularity.db* | ||
|
||
# Devcontainer | ||
.devcontainer/ | ||
|
||
node_modules | ||
/.pnp | ||
|
This file contains hidden or 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,76 +1,87 @@ | ||
run: | ||
tests: false | ||
skip-dirs: | ||
- replication/internal | ||
- cmd/embed | ||
- docs | ||
- dashboard/model2ts | ||
- handler/datasource/generate | ||
- handler/storage/gen | ||
skip-files: | ||
- cmd/testutil.go | ||
|
||
linters: | ||
enable-all: true | ||
disable: | ||
- typecheck | ||
- interfacer | ||
- structcheck | ||
- golint | ||
- ifshort | ||
- scopelint | ||
- varcheck | ||
- varnamelen | ||
- maligned | ||
- deadcode | ||
- structcheck | ||
- gci | ||
- goimports | ||
- gofumpt | ||
- nolintlint | ||
- ireturn | ||
- nosnakecase | ||
- nlreturn | ||
- godox | ||
- gomoddirectives | ||
- rowserrcheck | ||
- sqlclosecheck | ||
- wastedassign | ||
- gocognit | ||
- wsl | ||
- musttag | ||
- exhaustivestruct | ||
- cyclop | ||
- gomnd | ||
- gochecknoglobals | ||
- funlen | ||
- gocyclo | ||
- exhaustruct | ||
- wrapcheck | ||
- nestif | ||
- containedctx | ||
- maintidx | ||
- nonamedreturns | ||
- nilnil | ||
- prealloc | ||
- gochecknoinits | ||
- dupl | ||
- forbidigo | ||
- godot | ||
- depguard | ||
- nakedret | ||
- tagalign | ||
- lll | ||
- dupword | ||
- interfacebloat | ||
- goconst | ||
|
||
linters-settings: | ||
errcheck: | ||
exclude-functions: | ||
- (github.com/libp2p/go-libp2p/network.MuxedStream).SetDeadline | ||
- (github.com/data-preservation-programs/singularity/service.DatasetWorker).cleanup | ||
revive: | ||
rules: | ||
- name: var-naming | ||
disabled: true | ||
version: "2" | ||
run: | ||
tests: false | ||
linters: | ||
default: all | ||
disable: | ||
- containedctx | ||
- cyclop | ||
- depguard | ||
- dupl | ||
- dupword | ||
- exhaustruct | ||
- forbidigo | ||
- funlen | ||
- gochecknoglobals | ||
- gochecknoinits | ||
- gocognit | ||
- goconst | ||
- gocyclo | ||
- godot | ||
- godox | ||
- gomoddirectives | ||
- interfacebloat | ||
- ireturn | ||
- lll | ||
- maintidx | ||
- mnd | ||
- musttag | ||
- nakedret | ||
- nestif | ||
- nilnil | ||
- nlreturn | ||
- nolintlint | ||
- nonamedreturns | ||
- prealloc | ||
- rowserrcheck | ||
- sqlclosecheck | ||
- tagalign | ||
- varnamelen | ||
- wastedassign | ||
- wrapcheck | ||
- wsl | ||
- contextcheck | ||
- forcetypeassert | ||
- funcorder | ||
- exhaustive | ||
- intrange | ||
settings: | ||
gosec: | ||
excludes: | ||
- G115 # we do a lot of uint64 conversions unfortunately | ||
errcheck: | ||
exclude-functions: | ||
- path/filepath.Walk | ||
- (github.com/libp2p/go-libp2p/network.MuxedStream).SetDeadline | ||
- (github.com/data-preservation-programs/singularity/service.DatasetWorker).cleanup | ||
revive: | ||
rules: | ||
- name: var-naming | ||
disabled: true | ||
recvcheck: | ||
disable-builtin: true | ||
exclusions: | ||
- "*.Value" | ||
- "*.String" | ||
- "*.MarshalBinary" | ||
- "*.MarshalJSON" | ||
exclusions: | ||
generated: lax | ||
presets: | ||
- comments | ||
- common-false-positives | ||
- legacy | ||
- std-error-handling | ||
paths: | ||
- third_party$ | ||
- builtin$ | ||
- examples$ | ||
formatters: | ||
enable: | ||
- gofmt | ||
exclusions: | ||
generated: lax | ||
paths: | ||
- third_party$ | ||
- builtin$ | ||
- examples$ |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we might want to lock this but keeping the local version on
latest
does make it a bit more likely that we'll keep up with upstream changes