-
-
Notifications
You must be signed in to change notification settings - Fork 592
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature: G101 match variable values and names (#971)
* G101 now checks LHS of ValueAssignments for patternValue. * Added matching string literals in equality check. * Added patternValue matching for ValueSpec. * Ran gci to fix linter error. * Added tests and updated regex to be more inclusive. * Addressed short-circuit eval for isHighEntropy and non-standard ok variable. * Resolved unhandled error and added more tests. * Flattened code to make it more readable. * Added better comments. * Added new regex for Google API Key, GitHub PAT, and GoogleOAuth. * Gofmt'ed the test cases.
- Loading branch information
Showing
3 changed files
with
175 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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