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: support With and LogAttrs functions #41

Merged
merged 3 commits into from
May 9, 2024

Conversation

tigrato
Copy link
Contributor

@tigrato tigrato commented May 9, 2024

This PR enforces the lint rules to With and LogAttrs functions that are enforced to arguments in other logger funcs.

Fixes #38

@tigrato tigrato changed the title feat: enforce lint rules to With func feat: enforce lint rules to With and LogAttrs funcs May 9, 2024
Copy link

codecov bot commented May 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.80%. Comparing base (f87bbdf) to head (9e40331).
Report is 5 commits behind head on main.

❗ Current head 9e40331 differs from pull request most recent head 9bbec78. Consider uploading reports for the commit 9bbec78 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #41      +/-   ##
==========================================
- Coverage   84.06%   83.80%   -0.26%     
==========================================
  Files           2        2              
  Lines         251      315      +64     
==========================================
+ Hits          211      264      +53     
- Misses         33       42       +9     
- Partials        7        9       +2     

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

@tmzane tmzane self-requested a review May 9, 2024 21:39
This PR enforces the lint rules to `With` functions that are enforced to arguments in other logger funcs.

Signed-off-by: Tiago Silva <[email protected]>
@tmzane tmzane changed the title feat: enforce lint rules to With and LogAttrs funcs feat: support With and LogAttrs functions May 9, 2024
sloglint.go Outdated Show resolved Hide resolved
@tmzane tmzane merged commit 6dd777b into go-simpler:main May 9, 2024
8 checks passed
@tmzane
Copy link
Member

tmzane commented May 9, 2024

Thanks!

@tigrato
Copy link
Contributor Author

tigrato commented May 10, 2024

@tmzane can you please cut a new release so we can integrate it with our CI?

@tmzane
Copy link
Member

tmzane commented May 10, 2024

Yep, just wanted to refactor some internals first. Almost done.

@tmzane
Copy link
Member

tmzane commented May 10, 2024

@tigrato see https://github.com/go-simpler/sloglint/releases/tag/v0.7.0

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.

slog.With, slog.LogAttrs functions are not reported
2 participants