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

fix: correct linters-settings typo in .golangci.yml #696

Merged
merged 2 commits into from
Feb 3, 2025

Conversation

thevilledev
Copy link
Contributor

The linter configuration had a typo ("linter-settings" instead of "linters-settings"), which prevented linter rules from being applied. Fixing this revealed and resolved multiple style issues across the codebase:

  • Renamed shadowing parameter in net_unix.go
  • Fixed import grouping in valueparser_test.go
  • Corrected comment capitalization and spelling
  • Unused parameters

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
The linter configuration had a typo ("linter-settings" instead of
"linters-settings"), which prevented linter rules from being applied.
Fixing this revealed and resolved multiple style issues across the codebase:

- Renamed shadowing parameter in `net_unix.go`
- Fixed import grouping in `valueparser_test.go`
- Corrected comment capitalization and spelling
- Unused parameters

Signed-off-by: Ville Vesilehto <ville@vesilehto.fi>
Copy link
Member

@discordianfish discordianfish left a comment

Choose a reason for hiding this comment

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

Oops, good catch. Thanks!

@discordianfish
Copy link
Member

Looks like there are still issues:

  Running [/home/runner/golangci-lint-1.60.2-linux-amd64/golangci-lint run  --verbose] in [/home/runner/work/procfs/procfs] ...
  Received 117687 of 117687 (100.0%), 0.1 MBs/sec
  Error: sysfs/vulnerability_test.go:44:38: `spectre` is a misspelling of `specter` (misspell)
  		{"Mitigation more special chars", "spectre_v1", &Vulnerability{CodeName: "spectre_v1", State: VulnerabilityStateMitigation, Mitigation: "usercopy/swapgs barriers and __user pointer sanitization"}, false},
  		                                   ^
  Error: sysfs/vulnerability_test.go:45:45: `spectre` is a misspelling of `specter` (misspell)
  		{"Mitigation with multiple subsections", "spectre_v2", &Vulnerability{CodeName: "spectre_v2", State: VulnerabilityStateMitigation, Mitigation: "Retpolines, IBPB: conditional, STIBP: always-on, RSB filling, PBRSB-eIBRS: Not affected"}, false},
  		                                          ^
  

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Signed-off-by: Ville Vesilehto <ville@vesilehto.fi>
@thevilledev
Copy link
Contributor Author

Weird - I'm running latest golangci-lint version locally and it didn't catch this. Ran it on another machine and it did. Oh well, pushed a nolint fix since these refer to a vulnerability name. Should be fine now!

@discordianfish discordianfish merged commit 64d7b47 into prometheus:master Feb 3, 2025
9 checks passed
@discordianfish
Copy link
Member

Thanks!

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.

None yet

2 participants