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

Consider using depguard in Go linting #430

Open
johnboyes opened this issue Feb 10, 2024 · 0 comments
Open

Consider using depguard in Go linting #430

johnboyes opened this issue Feb 10, 2024 · 0 comments

Comments

@johnboyes
Copy link
Contributor

johnboyes commented Feb 10, 2024

One way to evaluate using depguard would be to turn it on on a feature branch and then see what warnings it produces, and if they are useful.

johnboyes added a commit that referenced this issue Feb 10, 2024
Created #430 to consider reinstating it in the future.
johnboyes added a commit that referenced this issue Feb 10, 2024
* Bump reviewdog golangci-lint action major version

This is a necessary precursor to bumping the Go version from 1.21 to
1.22, which will be done in separate PR.

* Remove deprecated deadcode linter

See golangci/golangci-lint#3125

* Add missing period at end of comment

As warned by golangci-lint.

* Remove unnecessary trailing whitespace

As per golangci-lint warning.

* Change case of variable to mixed not snake

As per golangci-lint warning.

* Fix cuddled statements warned by golangci-lint

* Fix return with no blank line before lint warnings

* Fix unchecked error return value linting warnings

* Exclude line from line length linter warning

* Format files with gofumpt to fix linting warnings

* Exclude file permissions line from gosec linting

The [gosec linter][1] warns by default on
[file permissions above 0600][2]. We need the permissions to be 0644 for
this line (because it has to be written to), so we exclude it from
linting.

[1]: https://github.com/securego/gosec
[2]: securego/gosec#107

* Remove depguard from Go linting

Created #430 to consider reinstating it in the future.

* Fix magic number warning by extracting constant

* Fix cuddling linter warnings

* Add required comment to exported function

* Do not use deprecated ioutil package

* Remove unused function
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

No branches or pull requests

1 participant