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

Require safety propagation based on getters #2218

Merged
merged 5 commits into from
Apr 25, 2022

Conversation

carterkozak
Copy link
Contributor

@carterkozak carterkozak commented Apr 22, 2022

==COMMIT_MSG==
Require log-safety annotation propagation based detected getters and superclasses/superinterfaces
==COMMIT_MSG==

We combine the safety of superclasses, as well as getters (non-static methods with zero parameters and non-void return type) to estimate the safety of a class. We only apply unsafe/do-not-log annotations as this heuristic is not exhaustive, so we bias toward cases in which we're confident we can be safer.

@changelog-app
Copy link

changelog-app bot commented Apr 22, 2022

Generate changelog in changelog/@unreleased

Type

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

Description

SafeLoggingPropagation error-prone check propages log-safety annotations from getters and superclasses/superinterfaces to the type level

Check the box to generate changelog(s)

  • Generate changelog entry

@carterkozak carterkozak requested a review from fawind April 22, 2022 19:16
Comment on lines +42 to +43
// This will be promoted after an initial rollout period
severity = BugPattern.SeverityLevel.SUGGESTION,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is currently SUGGESTION so I can excavate fixes in a way that's decoupled from baseline upgrades.

Copy link
Contributor

@fawind fawind 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 f6b9866 into develop Apr 25, 2022
@bulldozer-bot bulldozer-bot bot deleted the ckoazk/SafeLoggingAnnotationCheck branch April 25, 2022 09:19
@svc-autorelease
Copy link
Collaborator

Released 4.112.0

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

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

# Release Notes
## 4.112.0
| Type | Description | Link |
| ---- | ----------- | ---- |
| Improvement | `SafeLoggingPropagation` error-prone check propages log-safety annotations from getters and superclasses/superinterfaces to the type level | palantir/gradle-baseline#2218 |



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

4 participants