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

Extend linter rules #1300

Merged
merged 9 commits into from
Nov 10, 2023
Merged

Extend linter rules #1300

merged 9 commits into from
Nov 10, 2023

Conversation

surik
Copy link
Contributor

@surik surik commented Nov 9, 2023

Describe your changes

This PR adds the following linters and addresses issues raised by them:

  • dupword checks for duplicate words in the source code
  • durationcheck checks for two durations multiplied together
  • forbidigo forbids identifiers
  • mirror reports wrong mirror patterns of bytes/strings usage
  • misspell finds commonly misspelled English words in comments
  • predeclared finds code that shadows one of Go's predeclared identifiers
  • thelper detects Go test helpers without t.Helper() call and checks the consistency of test helpers

Issue ticket number and link

Checklist

  • Is it a bug fix
  • Is a typo/documentation fix
  • Is a feature enhancement
  • It is a refactor
  • Created tests that fail without the change (if possible)
  • Extended the README / documentation, if necessary

@surik surik marked this pull request as ready for review November 10, 2023 10:37
@surik surik requested a review from mlsmaycon November 10, 2023 12:55
@surik surik merged commit 9e87256 into main Nov 10, 2023
21 checks passed
@surik surik deleted the yury/extend-linter branch November 10, 2023 15:33
pulsastrix pushed a commit to pulsastrix/netbird that referenced this pull request Dec 24, 2023
- dupword checks for duplicate words in the source code
- durationcheck checks for two durations multiplied together
- forbidigo forbids identifiers
- mirror reports wrong mirror patterns of bytes/strings usage
- misspell finds commonly misspelled English words in comments
- predeclared finds code that shadows one of Go's predeclared identifiers
- thelper detects Go test helpers without t.Helper() call and checks the consistency of test helpers
Foosec pushed a commit to Foosec/netbird that referenced this pull request May 8, 2024
- dupword checks for duplicate words in the source code
- durationcheck checks for two durations multiplied together
- forbidigo forbids identifiers
- mirror reports wrong mirror patterns of bytes/strings usage
- misspell finds commonly misspelled English words in comments
- predeclared finds code that shadows one of Go's predeclared identifiers
- thelper detects Go test helpers without t.Helper() call and checks the consistency of test helpers
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.

2 participants