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

some interesting static check warnings #159

Closed
jxsl13 opened this issue Aug 20, 2023 · 5 comments
Closed

some interesting static check warnings #159

jxsl13 opened this issue Aug 20, 2023 · 5 comments
Labels
requires investigation This needs to be looked at in more detail

Comments

@jxsl13
Copy link

jxsl13 commented Aug 20, 2023

Some filtered staticcheck warnings that might be interesting

datamodel/high/base/schema.go:234:2: empty branch (SA9003)

datamodel/low/extraction_functions.go:121:89: error should be returned as the last argument (ST1008)


datamodel/low/reference.go:164:2: ineffective assignment to field NodeReference.Reference (SA4005)
datamodel/low/reference.go:176:6: ineffective assignment to field NodeReference.ReferenceNode (SA4005)
datamodel/low/reference.go:257:2: ineffective assignment to field ValueReference.Reference (SA4005)


datamodel/low/extraction_functions.go:487:5: this value of rv is never used (SA4006)
datamodel/low/extraction_functions.go:494:4: this value of referenceValue is never used (SA4006)
datamodel/low/extraction_functions.go:505:7: this value of rvt is never used (SA4006)
datamodel/low/extraction_functions.go:510:6: this value of referenceValue is never used (SA4006)
index/extract_refs.go:355:3: this value of seenPath is never used (SA4006)
@daveshanley
Copy link
Member

Which tool are you using to generate this report?

@jxsl13
Copy link
Author

jxsl13 commented Aug 25, 2023

staticcheck

@jxsl13
Copy link
Author

jxsl13 commented Aug 25, 2023

it is part of: https://github.com/dominikh/go-tools
and is usually part of the VS Code Go extension.

@daveshanley
Copy link
Member

I don't use VSCode, so I will try the tool out manually.

@daveshanley daveshanley added the requires investigation This needs to be looked at in more detail label Aug 25, 2023
daveshanley added a commit that referenced this issue Feb 7, 2024
Cleaned up all interesting static checks. All that is left is cosmetics.

Signed-off-by: quobix <dave@quobix.com>
@daveshanley daveshanley mentioned this issue Feb 7, 2024
daveshanley added a commit that referenced this issue Feb 7, 2024
Cleaned up all interesting static checks. All that is left is cosmetics.

Signed-off-by: quobix <dave@quobix.com>
@daveshanley
Copy link
Member

All the static check warnings have now been cleaned up, the only ones left are cosmetic elements, or signature changes that are breaking for no reason. Effective v0.15.6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
requires investigation This needs to be looked at in more detail
Projects
None yet
Development

No branches or pull requests

2 participants