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

feat: implement -context-only=scope #33

Merged
merged 4 commits into from
Apr 20, 2024
Merged

feat: implement -context-only=scope #33

merged 4 commits into from
Apr 20, 2024

Conversation

tmzane
Copy link
Member

@tmzane tmzane commented Mar 18, 2024

Closes #29

Copy link

codecov bot commented Mar 18, 2024

Codecov Report

Attention: Patch coverage is 91.91919% with 8 lines in your changes are missing coverage. Please review.

Project coverage is 86.41%. Comparing base (f87bbdf) to head (0f71de0).
Report is 2 commits behind head on main.

Files Patch % Lines
sloglint.go 91.91% 7 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #33      +/-   ##
==========================================
+ Coverage   84.06%   86.41%   +2.34%     
==========================================
  Files           2        2              
  Lines         251      287      +36     
==========================================
+ Hits          211      248      +37     
+ Misses         33       32       -1     
  Partials        7        7              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@tmzane tmzane requested a review from mattdowdell April 15, 2024 12:07
@tmzane
Copy link
Member Author

tmzane commented Apr 15, 2024

@mattdowdell could you please take a look?

@tmzane tmzane merged commit f4014dd into main Apr 20, 2024
10 checks passed
@tmzane tmzane deleted the context-only-scope branch April 20, 2024 16:41
@mattdowdell
Copy link
Collaborator

@tmzane Pologies for missing this. The code changes look reasonable, as do the tests. But I wondered what happens when this gets picked up by golangci-lint. Should we also map "true" to "all" to preserve the old behaviour?

@tmzane
Copy link
Member Author

tmzane commented Apr 21, 2024

@mattdowdell no worries, thanks for the post merge review :)

Should we also map "true" to "all" to preserve the old behaviour?

I guess this could work for yaml configs but not for stricter formats, such as json and toml (IIRC, both are supported by golangci-lint). Instead, we decided to deprecate the old option and add a new one that accepts strings.

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.

Only enforce context-only when a context.Context is within scope
2 participants