Merged
Conversation
Contributor
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.OpenSSF Scorecard
Scanned Files
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
turbolent
approved these changes
Dec 4, 2025
Member
turbolent
left a comment
There was a problem hiding this comment.
Thank you for fixing this! 🙏
turbolent
reviewed
Dec 4, 2025
peterargue
commented
Dec 4, 2025
| description: "disallow struct field writes outside constructor" | ||
| original-url: "github.com/onflow/flow-go/tools/structwrite" | ||
|
|
||
| version: "2" |
Contributor
Author
There was a problem hiding this comment.
made these changes using the migration tool
golangci-lint migrate
peterargue
commented
Dec 4, 2025
Comment on lines
+20
to
+37
| # TODO: these were added to allow updating to the latest version of the linter. | ||
| # Update the code to remove these issues instead of suppressing them. | ||
| - -QF1001 # could apply De Morgan's law" were hidden | ||
| - -QF1003 # could use tagged switch on chainID (staticcheck) | ||
| - -QF1006 # could lift into loop condition (staticcheck) | ||
| - -QF1008 # could remove embedded field \"BaseConfig\" from selector" were hidden | ||
| - -QF1011 # could omit type flow.IdentifierList from declaration; it will be inferred from the right-hand side" were hidden | ||
| - -QF1012 # Use fmt.Fprintf(...) instead of Write([]byte(fmt.Sprintf(...))) (staticcheck) | ||
| - -S1021 # should merge variable declaration with assignment on next line (staticcheck) | ||
| - -ST1003 # should not use underscores in package names" were hidden | ||
| - -ST1005 # error strings should not be capitalized" were hidden | ||
| - -ST1006 # receiver name should not be an underscore, omit the name if it is unused (staticcheck) | ||
| - -ST1008 # error should be returned as the last argument" were hidden | ||
| - -ST1012 # error var factoryError should have name of the form errFoo" were hidden | ||
| - -ST1016 # methods on the same type should have the same receiver name (seen 45x "db", 4x "s") (staticcheck) | ||
| - -ST1017 # don't use Yoda conditions" were hidden | ||
| - -ST1019 # other import of \"github.com/onflow/flow-go/model/bootstrap\"" were hidden | ||
| - -ST1023 # should omit type flow.IdentifierList from declaration; it will be inferred from the right-hand side" were hidden |
Contributor
Author
There was a problem hiding this comment.
we should be able to fix most of these. I did some spot checks and there are dozens of issues to fix so I'll leave that for another PR
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The "Build Custom Linter" was failing:
https://github.com/onflow/flow-go/actions/runs/19903386660/job/57055284623#step:6:7