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

BUILD: add fast flag to lint #154

Merged
merged 1 commit into from
Mar 27, 2022
Merged

BUILD: add fast flag to lint #154

merged 1 commit into from
Mar 27, 2022

Conversation

eranra
Copy link
Collaborator

@eranra eranra commented Mar 25, 2022

No description provided.

@eranra eranra linked an issue Mar 25, 2022 that may be closed by this pull request
@eranra eranra requested a review from ronensc March 25, 2022 16:08
@eranra
Copy link
Collaborator Author

eranra commented Mar 27, 2022

@amorenoz FYI

@eranra eranra changed the title add fast flag to lint BUILD: add fast flag to lint Mar 27, 2022
@ronensc
Copy link
Collaborator

ronensc commented Mar 27, 2022

I ran $(GOLANGCI_LINT) run --enable goimports --timeout 5m with the --verbose flag and found that it ran 11 linters:

INFO [lintersdb] Active 11 linters: [deadcode errcheck goimports gosimple govet ineffassign staticcheck structcheck typecheck unused varcheck]

adding the --fast flag reduces the linters to these 2:

INFO [lintersdb] Active 2 linters: [goimports ineffassign]

@eranra
Copy link
Collaborator Author

eranra commented Mar 27, 2022

@ronensc I added golang version detections for 1.18 and change the code to run minimal linting only for 1.18. For other versions of golang (i.e. 1.17) we use regular linting. Over time when the community adds support for 1.18 we will remove this limitation.

@codecov-commenter
Copy link

Codecov Report

Merging #154 (e5de3ad) into main (6668d30) will decrease coverage by 0.37%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main     #154      +/-   ##
==========================================
- Coverage   58.46%   58.08%   -0.38%     
==========================================
  Files          51       51              
  Lines        2949     2949              
==========================================
- Hits         1724     1713      -11     
- Misses       1113     1123      +10     
- Partials      112      113       +1     
Flag Coverage Δ
unittests 58.08% <ø> (-0.38%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
pkg/pipeline/utils/exit.go 52.17% <0.00%> (-47.83%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6668d30...e5de3ad. Read the comment docs.

@eranra eranra merged commit 6a25d4a into netobserv:main Mar 27, 2022
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.

Cannot build project with golang 1.18
4 participants