-
Notifications
You must be signed in to change notification settings - Fork 138
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
golangci-lint: skip prealloc/fieldalignment in all test files #7263
Conversation
.golangci.yml
Outdated
@@ -70,10 +70,12 @@ linters-settings: | |||
# Disable goconst in test files, often we have duplicated strings across tests, but don't make sense as constants. | |||
issues: | |||
exclude-rules: | |||
- path: (_test\.go|utilities_testing\.go) | |||
# cover utilities_testing.go and _test.go files | |||
- path: (_test.*go) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the .go
suffix still needs escaping with \.go
- path: (_test.*go) | |
- path: (_test.*\.go) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These previous suggestions/fixes have been lost in the force push
1dee5d0
to
0b77c01
Compare
.golangci.yml
Outdated
@@ -70,10 +70,12 @@ linters-settings: | |||
# Disable goconst in test files, often we have duplicated strings across tests, but don't make sense as constants. | |||
issues: | |||
exclude-rules: | |||
- path: (_test\.go|utilities_testing\.go) | |||
# cover utilities_testing.go and _test.go files | |||
- path: (_test.*go) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These previous suggestions/fixes have been lost in the force push
0b77c01
to
b7a39d2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did another force push and I updated the rules to account for base/util_testing.go
Maybe I just don't understand this syntax... Wouldn't |
user error, stand by |
…ed linters in the future, fix regex again
* Cover all test files * Mark only gosimple as a disabled linter, future proof removing disabled linters in the future, fix regex again
There are test files named
*test*.go
likeutilities_testing.go
orhlv_utilities_testing.go
and we do not care about aligning struct fields or preallocating maps/arrays for these.