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

prevent using logsafe Args with guava Preconditions #2139

Merged
merged 6 commits into from
Apr 2, 2022

Conversation

rzpt
Copy link
Contributor

@rzpt rzpt commented Mar 28, 2022

Before this PR

Sometimes the wrong Preconditions is imported. This prevents one such case.

After this PR

==COMMIT_MSG==
prevent using logsafe Args with guava Preconditions
==COMMIT_MSG==

Possible downsides?

None?

@changelog-app
Copy link

changelog-app bot commented Mar 28, 2022

Generate changelog in changelog/@unreleased

Type

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

Description

prevent using logsafe Args with guava Preconditions

Check the box to generate changelog(s)

  • Generate changelog entry

@policy-bot policy-bot bot requested a review from carterkozak March 28, 2022 17:37
@carterkozak
Copy link
Contributor

Mind linking me where this came up internally?

}
}
return Description.NO_MATCH;
} else if (args.size() == 2) {
Copy link
Contributor

Choose a reason for hiding this comment

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

It might be cleanest if we merge these branches, allMatch for zero additional args (args.size() == 2) appears to do the right thing

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I tried to do that but I couldn't find a way to do it without making the rule more aggressive.

Copy link
Contributor

Choose a reason for hiding this comment

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

Thoughts on this? #2166

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks! I thought I tried that and many tests failed.

Copy link
Contributor

@carterkozak carterkozak left a comment

Choose a reason for hiding this comment

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

one suggestion, otherwise lgtm. Thanks!

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

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

# Release Notes
## 4.93.0
| Type | Description | Link |
| ---- | ----------- | ---- |
| Improvement | prevent using logsafe Args with guava Preconditions | palantir/gradle-baseline#2139 |



To enable or disable this check, please contact the maintainers of Excavator.
This was referenced Apr 2, 2022
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.

None yet

3 participants