ydb-go-sdk
ydb-go-sdk copied to clipboard
enable gocognit linter
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:
- [ ] Bugfix
- [ ] Feature
- [ ] Code style update (formatting, renaming)
- [x] Refactoring (no functional changes, no api changes)
- [x] Build related changes
- [ ] Documentation content changes
- [ ] Other (please describe):
What is the current behavior?
Issue Number: #938
What is the new behavior?
Other information
First I load the files with the linter turned off to check the ci tests. I have the linter enabled locally and with the last commit I enabled the linter in the remote repository.
Codecov Report
Attention: 230 lines
in your changes are missing coverage. Please review.
Comparison is base (
c6e45cd
) 68.48% compared to head (57a84ee
) 68.72%.
Additional details and impacted files
@@ Coverage Diff @@
## master #1037 +/- ##
==========================================
+ Coverage 68.48% 68.72% +0.24%
==========================================
Files 252 252
Lines 25155 25420 +265
==========================================
+ Hits 17228 17471 +243
- Misses 7069 7093 +24
+ Partials 858 856 -2
Flag | Coverage Δ | |
---|---|---|
55.48% <60.96%> (+0.29%) |
:arrow_up: | |
go-1.20.x | 68.57% <70.84%> (+0.30%) |
:arrow_up: |
go-1.21.x | 68.67% <70.84%> (+0.21%) |
:arrow_up: |
integration | 55.48% <60.96%> (+0.29%) |
:arrow_up: |
macOS | 38.34% <15.71%> (-0.32%) |
:arrow_down: |
ubuntu | 38.38% <15.71%> (-0.30%) |
:arrow_down: |
unit | 38.44% <15.71%> (-0.30%) |
:arrow_down: |
windows | 38.38% <15.71%> (-0.34%) |
:arrow_down: |
ydb-22.5 | 55.00% <60.96%> (+0.17%) |
:arrow_up: |
ydb-23.1 | 54.98% <59.31%> (+0.04%) |
:arrow_up: |
ydb-23.2 | 55.16% <60.96%> (+0.34%) |
:arrow_up: |
ydb-23.3 | 55.22% <59.31%> (+0.23%) |
:arrow_up: |
Flags with carried forward coverage won't be shown. Click here to find out more.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
I noted one comment //nolint:gocognit, because if I rewrite a function internal/cmd/gtrace.findGtraceGen in
for _, c := range v.List { if strings.Contains(strings.TrimPrefix(c.Text, "//"), "gtrace:gen") { if item == nil { item = &GenItem{} } } }
the autotest breaks either tests / unit (1.21.x, windows)
Summary of review:
- Need to rebase to master
- Need to add exclude-rules into .golangci.yaml config for:
- all tests
- packages
log
andmetrics
- Need to add unit tests for newest funcs
- Minor issues see in full review