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

Add initial golangci-lint action #2647

Merged
merged 73 commits into from Aug 5, 2021
Merged

Conversation

cce
Copy link
Contributor

@cce cce commented Jul 28, 2021

Summary

Run golangci-lint from Github actions using https://github.com/golangci/golangci-lint-action

Test Plan

Adds new check to PRs and merges.

@codecov-commenter
Copy link

codecov-commenter commented Jul 28, 2021

Codecov Report

Merging #2647 (d546b46) into master (39be0c7) will increase coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2647      +/-   ##
==========================================
+ Coverage   47.07%   47.08%   +0.01%     
==========================================
  Files         349      349              
  Lines       55858    55858              
==========================================
+ Hits        26294    26300       +6     
+ Misses      26617    26611       -6     
  Partials     2947     2947              
Impacted Files Coverage Δ
ledger/acctupdates.go 62.21% <0.00%> (-0.09%) ⬇️
network/wsPeer.go 74.93% <0.00%> (+0.55%) ⬆️
catchup/service.go 69.35% <0.00%> (+0.77%) ⬆️
cmd/tealdbg/debugger.go 73.86% <0.00%> (+1.00%) ⬆️

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 39be0c7...d546b46. Read the comment docs.

@winder
Copy link
Contributor

winder commented Jul 28, 2021

Woah, this is really cool!

@cce
Copy link
Contributor Author

cce commented Jul 29, 2021

Hrmm, too bad, reviewdog has not yet implemented the ability to pass through the different golangci-lint severity levels (errors vs warnings) to Github checks yet reviewdog/reviewdog#343

Copy link
Contributor

@algobarb algobarb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is pretty cool.
So we're adding in the ReviewDog workflow which would act on github actions and it calls the tests directly, separating errors from warnings. So we moved partition-test away from .golangci.yml tests to .golangci-warnings.yml so that we only get warnings from reviewdogs instead of errors on the PRs right? What does changing .golangci.yml tests from true to false do?

@algojack
Copy link
Contributor

algojack commented Aug 5, 2021

This is pretty cool.
So we're adding in the ReviewDog workflow which would act on github actions and it calls the tests directly, separating errors from warnings. So we moved partition-test away from .golangci.yml tests to .golangci-warnings.yml so that we only get warnings from reviewdogs instead of errors on the PRs right? What does changing .golangci.yml tests from true to false do?

Tests: true -> false, tells the linters not to check test files that end in "_test.go". We have it true in warnings but false in blocking errors. And even in warnings we only limit them to partitiontest linter by excluding all other linters.

Copy link
Contributor

@algobarb algobarb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks good to me.

@algojohnlee algojohnlee merged commit 3d3feb5 into master Aug 5, 2021
@algojack algojack deleted the feature/gha-golangci-lint branch August 5, 2021 20:50
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.

None yet

10 participants