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

Implement LoggerInterpolationConsumesThrowable #1886

Merged
merged 3 commits into from
Aug 19, 2021

Conversation

carterkozak
Copy link
Contributor

Flag as an ERROR when logging statements fail to produce a
stack trace due to excessive slf4j-style interpolation
placeholders.

==COMMIT_MSG==
error-prone LoggerInterpolationConsumesThrowable: Flag as an ERROR when logging statements fail to produce a stack trace due to excessive slf4j-style interpolation placeholders.
==COMMIT_MSG==

Flag as an ERROR when logging statements fail to produce a
stack trace due to excessive slf4j-style interpolation
placeholders.
@changelog-app
Copy link

changelog-app bot commented Aug 18, 2021

Generate changelog in changelog/@unreleased

Type

  • Feature
  • Improvement
  • Fix
  • Break
  • Deprecation
  • Manual task
  • Migration

Description

error-prone LoggerInterpolationConsumesThrowable: Flag as an ERROR when logging statements fail to produce a stack trace due to excessive slf4j-style interpolation placeholders.

Check the box to generate changelog(s)

  • Generate changelog entry

@policy-bot policy-bot bot requested a review from CRogers August 18, 2021 21:28
return Description.NO_MATCH;
}
int extraPlaceholders = stringPlaceholders - nonThrowableParameters;
return buildDescription(tree)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

There are a few common patterns we could likely auto-fix, but enough cases we can't that I haven't attempted to implement one.

If we find a lot of failures ending with {} or : {} it may be reasonable to automatically update them.

Copy link
Contributor

Choose a reason for hiding this comment

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

Might be interesting to track how many excavators fail to upgrade with this check, given we can't autofix them

Copy link
Contributor

@CRogers CRogers left a comment

Choose a reason for hiding this comment

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

nice!

@bulldozer-bot bulldozer-bot bot merged commit ee28ca5 into develop Aug 19, 2021
@bulldozer-bot bulldozer-bot bot deleted the ckozak/dont_consume_throwables branch August 19, 2021 10:49
@svc-autorelease
Copy link
Collaborator

Released 4.21.0

bulldozer-bot bot pushed a commit to palantir/witchcraft-api that referenced this pull request Aug 19, 2021
###### _excavator_ is a bot for automating changes across repositories.

Changes produced by the roomba/latest-baseline-oss check.

# Release Notes
## 4.21.0
| Type | Description | Link |
| ---- | ----------- | ---- |
| Improvement | error-prone LoggerInterpolationConsumesThrowable: Flag as an ERROR when logging statements fail to produce a stack trace due to excessive slf4j-style interpolation placeholders. | palantir/gradle-baseline#1886 |



To enable or disable this check, please contact the maintainers of Excavator.
This was referenced Aug 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants