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 -static-msg #18

Merged
merged 2 commits into from
Oct 29, 2023
Merged

Conversation

mattdowdell
Copy link
Collaborator

This adds support for enforcing log messages are static by requiring the use of string literals or constants.

Fixes #17.

@codecov
Copy link

codecov bot commented Oct 28, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (61cece7) 88.00% compared to head (4a41eaa) 88.67%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #18      +/-   ##
==========================================
+ Coverage   88.00%   88.67%   +0.67%     
==========================================
  Files           1        1              
  Lines         200      212      +12     
==========================================
+ Hits          176      188      +12     
  Misses         19       19              
  Partials        5        5              
Files Coverage Δ
sloglint.go 88.67% <100.00%> (+0.67%) ⬆️

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

@tmzane tmzane self-requested a review October 28, 2023 21:00
This adds support for enforcing log messages are static by requiring the use of string literals or
constants.

Fixes #17.
@tmzane tmzane changed the title feat: Add -static-msg option feat: implement -static-msg Oct 28, 2023
@tmzane tmzane merged commit 43ec8d8 into go-simpler:main Oct 29, 2023
@tmzane
Copy link
Member

tmzane commented Oct 29, 2023

@mattdowdell Thank you!

@mattdowdell mattdowdell deleted the matt/static-msg branch October 29, 2023 13:24
@mattdowdell
Copy link
Collaborator Author

@tmzane What's the process for gettng the new options added here and in previous PRs available in golangci-lint? I'm happy to drive that forward, but any pointers you can provide would be appreciated.

@tmzane
Copy link
Member

tmzane commented Oct 30, 2023

@mattdowdell the previous options should be available as soon as #4166 is merged and the next release of golangci-lint is published. Speaking about -static-msg, I just pushed v0.3.0 that includes it, should appear as a separate PR by dependabot. You could also use sloglint standalone until the new features are available in golangci-lint 😉

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.

Check if log message is constant
2 participants