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

Update errcheck to latest from kisielk/master. #2

Merged
merged 25 commits into from
Apr 29, 2024

Conversation

rjacobs31
Copy link

The main errcheck repo has received some changes to improve compatibility with Go v1.22, which should probably be merged into Kalido's fork. This also has the benefit of resolving a security alert by Dependabot.

kisielk and others added 25 commits May 20, 2022 15:30
Detect the file beginning by using `pass.Fset.File(f.Pos())` instead of
assuming that `f.Pos()` is always the beginning of the file.

`f.Pos()` is not the beginning of the file when there is for instance a
comment before the package, which can lead to wrong reportings of the
actual error position.

Signed-off-by: Roman Mohr <[email protected]>
Calculate correct position with comments before the package keyword
…ielk#220)

Noticed that some useful flags were not documented in the README.md. I've added the these in what I think are the relevant sections. I did a minimal explanation of the flags, but can expand on them.

I erred on the side of not expanding on -ignoregenerated for example because the regex might change in the future, and documentation tends to be a forgotten update...
Directly specify the needed fields when loading packages
This allows wrapping errcheck.Analyzer with nolint.Wrap to silence
diagnostics with //nolint:errcheck comments.

Link: https://github.com/kyoh86/nolint

Signed-off-by: Robin Jarry <[email protected]>
* mod: Use latest /x/tools, use Go 1.18

Upgrades to the latest release of /x/tools and friends.
This is necessary to fix errors during `go test` similar to:

    This fixes errors like this: internal error: package "bytes" without types was imported from "command-line-arguments"

Supersedes kisielk#231

* ci: Test against Go 1.18-1.20

Switch CI to only test against Go 1.18 to 1.20.
Per the Go support policy, only 1.19 and 1.20 are currently supported,
but I've left 1.18 in there to support stragglers.

To reduce duplication in the CI job, this also switches to a test matrix
instead of copy-pasting the steps between each job.
* Update dependencies to work with Go 1.22

* Add go 1.22 to the build matrix in github actions

---------

Co-authored-by: Addie Bendory <[email protected]>
* chore(*): fix typos && simplify some test code

* chore(typo): fix typo
@rjacobs31 rjacobs31 merged commit facc4e7 into master Apr 29, 2024
5 checks passed
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.