go-simpler / sloglint

🪵 Ensure consistent code style when using log/slog
https://go-simpler.org/sloglint
Mozilla Public License 2.0
97 stars 5 forks source link

feat: implement `-context-only=scope` #33

Closed tmzane closed 5 months ago

tmzane commented 6 months ago

Closes #29

codecov[bot] commented 6 months ago

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 :warning:
Additional details and impacted files ```diff @@ 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 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

tmzane commented 5 months ago

@mattdowdell could you please take a look?

mattdowdell commented 5 months ago

@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 commented 5 months ago

@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.