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

🌱 Adjust 'exhaustive' linter to consider 'default' as exhaustive #2044

Merged
merged 2 commits into from Jul 13, 2022

Conversation

spencerschrock
Copy link
Contributor

@spencerschrock spencerschrock commented Jul 12, 2022

What kind of change does this PR introduce?

Configuration change for golangci-lint. With the current linter settings, default is useless and satisfying the linter involves adding empty cases that clutter the code more than default. I realize this is subjective, but the current setting is overly cautious.

What is the current behavior?

Switch statements on enums currently require cases for all enum members.

What is the new behavior (if this is a feature change)?**

default will satisfy the linter now.

Which issue(s) this PR fixes

NONE

Special notes for your reviewer

Does this PR introduce a user-facing change?

For user-facing changes, please add a concise, human-readable release note to
the release-note

(In particular, describe what changes users might need to make in their
application as a result of this pull request.)

NONE

Copy link
Member

@naveensrinivasan naveensrinivasan left a comment

Choose a reason for hiding this comment

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

Thank you!

.golangci.yml Show resolved Hide resolved
@naveensrinivasan naveensrinivasan enabled auto-merge (squash) July 13, 2022 00:13
@codecov
Copy link

codecov bot commented Jul 13, 2022

Codecov Report

Merging #2044 (2fe485b) into main (5d9d75b) will increase coverage by 2.62%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main    #2044      +/-   ##
==========================================
+ Coverage   50.56%   53.19%   +2.62%     
==========================================
  Files          87       87              
  Lines        7202     7202              
==========================================
+ Hits         3642     3831     +189     
+ Misses       3315     3119     -196     
- Partials      245      252       +7     

@github-actions
Copy link

Integration tests success for
[75c7636]
(https://github.com/ossf/scorecard/actions/runs/2659962062)

@spencerschrock spencerschrock temporarily deployed to integration-test July 13, 2022 16:49 Inactive
@github-actions
Copy link

Integration tests success for
[2fe485b]
(https://github.com/ossf/scorecard/actions/runs/2664978970)

@naveensrinivasan naveensrinivasan merged commit f61ed37 into ossf:main Jul 13, 2022
@spencerschrock spencerschrock deleted the exhaustive-linter-default branch July 13, 2022 17:55
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

2 participants