-
Notifications
You must be signed in to change notification settings - Fork 77
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
enable exhaustruct linter #1034
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1034 +/- ##
===========================================
- Coverage 66.64% 54.64% -12.00%
===========================================
Files 283 280 -3
Lines 27583 26506 -1077
===========================================
- Hits 18382 14484 -3898
- Misses 8342 11030 +2688
- Partials 859 992 +133
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
internal/allocator/allocator.go
Outdated
@@ -5,6 +5,7 @@ import ( | |||
|
|||
"github.com/ydb-platform/ydb-go-genproto/protos/Ydb" | |||
"github.com/ydb-platform/ydb-go-genproto/protos/Ydb_Table" | |||
"google.golang.org/protobuf/types/known/structpb" |
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.
Keep the order of imported packages. Standard library packages should be imported at first place, then external packages and project internal packages as last one. Refer other files in the projects for examples.
{gte: 0, lte: 8 * time.Second}, | ||
{gte: 0, lte: 8 * time.Second}, | ||
{gte: 0, lte: 8 * time.Second}, | ||
{eq: 0, gte: 0, lte: time.Second}, |
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.
is a linter required for tests too?
this code is too detailed for tests
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.
Yes, it is.
Exhaustruct linter checks all files, including tests.
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.
could you disable this linter for tests?
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'll try if possible.
Now, I don't know how to switch off the linter for tests.
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.
you can use something like this
issues:
exclude-rules:
- path: _test.go
linters:
- exhaustruct
@@ -29,14 +29,17 @@ | |||
|
|||
func getService(ctx context.Context, dsn string, opts ...ydb.Option) (s *service, err error) { | |||
once.Do(func() { | |||
transport := new(http.Transport) | |||
transport.TLSClientConfig = new(tls.Config) | |||
transport.TLSClientConfig.InsecureSkipVerify = true |
Check failure
Code scanning / CodeQL
Disabled TLS certificate check High
I hereby agree to the terms of the CLA available at: https://yandex.ru/legal/cla/?lang=en
Pull request type
Please check the type of change your PR introduces:
What is the current behavior?
Issue Number: #931
What is the new behavior?
Other information