Skip to content

nogo: add more staticcheck analyzers#12598

Open
tamird wants to merge 32 commits intogoogle:masterfrom
tamird:nogo-more-checks
Open

nogo: add more staticcheck analyzers#12598
tamird wants to merge 32 commits intogoogle:masterfrom
tamird:nogo-more-checks

Conversation

@tamird
Copy link
Contributor

@tamird tamird commented Feb 8, 2026

Please see individual commits:

  • nogo: add more staticcheck analyzers
  • Fix QF1001 violations and drop suppression
  • Fix QF1002 violations and drop suppression
  • Fix QF1003 violations and drop suppression
  • Fix QF1004 violations and drop suppression
  • Fix QF1005 violations and drop suppression
  • Fix QF1006 violations and drop suppression
  • Fix QF1007 violations and drop suppression
  • Fix QF1008 violations and drop suppression
  • Fix QF1012 violations and drop suppression
  • Fix S1000 violations and drop suppression
  • Fix S1002 violations and drop suppression
  • Fix S1003 violations and drop suppression
  • Fix S1004 violations and drop suppression
  • Fix S1005 violations and drop suppression
  • Fix S1007 violations and drop suppression
  • Fix S1008 violations and drop suppression
  • Fix S1009 violations and drop suppression
  • Fix S1011 violations and drop suppression
  • Fix S1012 violations and drop suppression
  • Fix S1016 violations and drop suppression
  • Fix S1019 violations and drop suppression
  • Fix S1020 violations and drop suppression
  • Fix S1021 violations and drop suppression
  • Fix S1023 violations and drop suppression
  • Fix S1024 violations and drop suppression
  • Fix S1025 violations and drop suppression
  • Fix S1034 violations and drop suppression
  • Fix S1030 violations and drop suppression
  • Fix S1039 violations and drop suppression
  • Fix S1033 violations and drop suppression
  • Fix S1040 violations and drop suppression

@tamird tamird force-pushed the nogo-more-checks branch 2 times, most recently from c83b596 to 4f17a0e Compare February 8, 2026 23:36
Copy link
Member

@nixprime nixprime left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix QF1008 violations and drop suppression

IMO this rule makes the code worse rather than better.

@tamird
Copy link
Contributor Author

tamird commented Feb 9, 2026

Fix QF1008 violations and drop suppression

IMO this rule makes the code worse rather than better.

Fair. I've split it out of this PR so we can get the less controversial bits merged.

@tamird
Copy link
Contributor Author

tamird commented Feb 12, 2026

Gentle ping here folks. Anything I can do to nudge this along?

@konstantin-s-bogom
Copy link
Member

Sorry, this is still pending on internal review :(

copybara-service bot pushed a commit that referenced this pull request Feb 13, 2026
Please see individual commits:

- **nogo: add more staticcheck analyzers**
- **Fix QF1001 violations and drop suppression**
- **Fix QF1002 violations and drop suppression**
- **Fix QF1003 violations and drop suppression**
- **Fix QF1004 violations and drop suppression**
- **Fix QF1005 violations and drop suppression**
- **Fix QF1006 violations and drop suppression**
- **Fix QF1007 violations and drop suppression**
- **Fix QF1008 violations and drop suppression**
- **Fix QF1012 violations and drop suppression**
- **Fix S1000 violations and drop suppression**
- **Fix S1002 violations and drop suppression**
- **Fix S1003 violations and drop suppression**
- **Fix S1004 violations and drop suppression**
- **Fix S1005 violations and drop suppression**
- **Fix S1007 violations and drop suppression**
- **Fix S1008 violations and drop suppression**
- **Fix S1009 violations and drop suppression**
- **Fix S1011 violations and drop suppression**
- **Fix S1012 violations and drop suppression**
- **Fix S1016 violations and drop suppression**
- **Fix S1019 violations and drop suppression**
- **Fix S1020 violations and drop suppression**
- **Fix S1021 violations and drop suppression**
- **Fix S1023 violations and drop suppression**
- **Fix S1024 violations and drop suppression**
- **Fix S1025 violations and drop suppression**
- **Fix S1034 violations and drop suppression**
- **Fix S1030 violations and drop suppression**
- **Fix S1039 violations and drop suppression**
- **Fix S1033 violations and drop suppression**
- **Fix S1040 violations and drop suppression**

FUTURE_COPYBARA_INTEGRATE_REVIEW=#12598 from tamird:nogo-more-checks a50651c
PiperOrigin-RevId: 868765670
copybara-service bot pushed a commit that referenced this pull request Feb 13, 2026
Please see individual commits:

- **nogo: add more staticcheck analyzers**
- **Fix QF1001 violations and drop suppression**
- **Fix QF1002 violations and drop suppression**
- **Fix QF1003 violations and drop suppression**
- **Fix QF1004 violations and drop suppression**
- **Fix QF1005 violations and drop suppression**
- **Fix QF1006 violations and drop suppression**
- **Fix QF1007 violations and drop suppression**
- **Fix QF1008 violations and drop suppression**
- **Fix QF1012 violations and drop suppression**
- **Fix S1000 violations and drop suppression**
- **Fix S1002 violations and drop suppression**
- **Fix S1003 violations and drop suppression**
- **Fix S1004 violations and drop suppression**
- **Fix S1005 violations and drop suppression**
- **Fix S1007 violations and drop suppression**
- **Fix S1008 violations and drop suppression**
- **Fix S1009 violations and drop suppression**
- **Fix S1011 violations and drop suppression**
- **Fix S1012 violations and drop suppression**
- **Fix S1016 violations and drop suppression**
- **Fix S1019 violations and drop suppression**
- **Fix S1020 violations and drop suppression**
- **Fix S1021 violations and drop suppression**
- **Fix S1023 violations and drop suppression**
- **Fix S1024 violations and drop suppression**
- **Fix S1025 violations and drop suppression**
- **Fix S1034 violations and drop suppression**
- **Fix S1030 violations and drop suppression**
- **Fix S1039 violations and drop suppression**
- **Fix S1033 violations and drop suppression**
- **Fix S1040 violations and drop suppression**

FUTURE_COPYBARA_INTEGRATE_REVIEW=#12598 from tamird:nogo-more-checks a50651c
PiperOrigin-RevId: 868765670
Comment on lines +270 to +278

QF1001: # Apply De Morgan’s law
# Controversial.
internal:
exclude: [".*"]
QF1008: # Omit embedded fields from selector expression
# Controversial.
internal:
exclude: [".*"]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why add these at all if these are going to be excluded on .*?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does that code look like, that doesn't add them? have a look at tools/nogo/check/analyzers.go, we aren't adding these by name.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does that code look like, that doesn't add them?

The version of nogo.yaml at HEAD does not reference these (QF1001 and QF1008). I see you have an intermediate commit to "move and explain suppression": 2744619 and d171aaa. I don't know which other commit in this PR added these to nogo.yaml in the first place.

But what I was suggesting was just removing these lines altogether?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing these lines amounts to enabling these linters. The suppressions were added in the very first commit.

I changed that commit to move these to the bottom so that the later commits would apply without merge conflicts.

The bottom line is that we need these here because we want these lints off.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

Comments