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

chore: add staticcheck pre-commit hook #1019

Merged
merged 1 commit into from
Apr 6, 2022

Conversation

kwanhur
Copy link
Contributor

@kwanhur kwanhur commented Mar 6, 2022

  • upgrade pre-commit-golang to v0.5.0
  • enable staticcheck hook on pre-commit

related issue #1017 (comment)

test case:

➜  bfe git:(precommit-sc) ✗ git add bfe_cli/a.go 
➜  bfe git:(precommit-sc) ✗ git cm "test check"
go fmt...................................................................Passed
go vet...................................................................Passed
go-unit-tests............................................................Passed
go-build.................................................................Passed
go staticcheck...........................................................Failed
- hook id: go-static-check
- exit code: 1

bfe_cli/a.go:3:5: var name is unused (U1000)
bfe_cli/a.go:5:6: func main is unused (U1000)

@codecov-commenter
Copy link

Codecov Report

Merging #1019 (c491e73) into develop (d5b10d7) will increase coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #1019      +/-   ##
===========================================
+ Coverage    54.24%   54.26%   +0.01%     
===========================================
  Files          301      301              
  Lines        26602    26602              
===========================================
+ Hits         14431    14436       +5     
+ Misses       10508    10504       -4     
+ Partials      1663     1662       -1     
Impacted Files Coverage Δ
bfe_util/fixed_pool.go 83.33% <0.00%> (-16.67%) ⬇️
bfe_spdy/frame_write.go 50.50% <0.00%> (ø)
bfe_spdy/server_conn.go 78.53% <0.00%> (ø)
bfe_http2/server.go 72.52% <0.00%> (+0.16%) ⬆️
bfe_websocket/server_conn.go 78.03% <0.00%> (+3.78%) ⬆️

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 d5b10d7...c491e73. Read the comment docs.

@iyangsj iyangsj merged commit 8e134e4 into bfenetworks:develop Apr 6, 2022
@kwanhur kwanhur deleted the precommit-sc branch April 7, 2022 14:34
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.

3 participants