Skip to content

Linting#1996

Merged
tlimoncelli merged 2 commits intomasterfrom
tlim_linting
Jan 28, 2023
Merged

Linting#1996
tlimoncelli merged 2 commits intomasterfrom
tlim_linting

Conversation

@tlimoncelli
Copy link
Copy Markdown
Contributor

Fixed these golint and staticcheck issues:

build/generate/featureMatrix.go:72:3: const ProviderDnsProvider should be ProviderDNSProvider
build/generate/functionTypes.go:158:6: exported type Function should have comment or be unexported
build/generate/functionTypes.go:167:6: exported type Param should have comment or be unexported
build/generate/functionTypes.go:196:9: if block ends with a return statement, so drop this else and outdent its block
commands/writeTypes.go:4:2: a blank import should be only in a main or test package, or have a comment justifying it
pkg/prettyzone/sorting.go:108:1: exported function LabelLess should have comment or be unexported
providers/hedns/hednsProvider.go:211:9: if block ends with a return statement, so drop this else and outdent its block
build/generate/featureMatrix.go:27:2: should replace loop with tableHeaders = append(tableHeaders, matrix.Features...) (S1011)
build/generate/featureMatrix.go:61:5: should omit comparison to bool constant, can be simplified to featureMap[featureName].HasFeature (S1002)
build/generate/featureMatrix.go:63:12: should omit comparison to bool constant, can be simplified to featureMap[featureName].Unimplemented (S1002)
pkg/diff2/analyze.go:255:10: empty branch (SA9003)

CC @cafferata

@cafferata
Copy link
Copy Markdown
Contributor

cafferata commented Jan 27, 2023

Thank you! How is the linting tool used? Why is this linting not guaranteed within GitHub actions?

@cafferata
Copy link
Copy Markdown
Contributor

Found it! go fmt ./... 😅

@cafferata
Copy link
Copy Markdown
Contributor

Perhaps a necessary step to include in the online documentation/pull request submission?

@tlimoncelli
Copy link
Copy Markdown
Contributor Author

Internally we're discussing moving to a new build pipeline. Until that decision is made, I don't want to invest too much in the pipeline. However adding it to the docs is fine.

@cafferata
Copy link
Copy Markdown
Contributor

Thanks for your response, see #2006 for a possible solution.

@tlimoncelli tlimoncelli merged commit 8249a4b into master Jan 28, 2023
@tlimoncelli tlimoncelli deleted the tlim_linting branch January 28, 2023 16:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants