-
Notifications
You must be signed in to change notification settings - Fork 737
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
RFE: configurable DoNotCall/RestrictedApi/JdkObsolete/DefaultCharset/JavaTimeDefaultTimeZone check #1211
Comments
W.r.t. point 2 (making it configurable): that could then also trivially replace |
One way we've discussed approach this is having a mechanism for associating annotations with APIs that we can't annotated directly (e.g. JDK APIs), similar to what the Checker Framework does with stub files. Then we wouldn't need e.g. both We don't have concrete plans around that, but I hope it happens someday. Doing something more targeted with flags or config files for the specific checks where this is most annoying might be a more pragmatic short-term fix. |
This checker checks for uses of System.out and System.err as possible logs used for debugging purpose. Inspired by [Policeman's Forbidden API Checker](https://github.com/policeman-tools/forbidden-apis)'s `jdk-system-out` checks. See also #1211 Fixes #1534 COPYBARA_INTEGRATE_REVIEW=#1534 from tbroyer:system-out 63b3acf PiperOrigin-RevId: 352884812
Description of the problem / feature request:
I'm currently using Policeman's Forbidden API Checker in addition to Error Prone. Some checks are duplicate of what Error Prone provides (default charset, default timezone), but Forbidden APIs provides additional checks (e.g. APIs using the default locale, no
System.out
/System.err
orprintStackTrace()
), and allows one to add new checks through simple text files.It occurred to me that those checks could be done at compile-time by Error Prone itself.
Feature requests: what underlying problem are you trying to solve with this feature?
Remove a tool that duplicates (some) functionality of Error Prone and runs later during the build (also contributing to build time); bringing its features to Error Prone itself:
System.out
/System.err
, orprintStackTrace()
I might try to build those as custom checks (if I find time), but thought you might be interested in adding this right into Error Prone itself.
What version of Error Prone are you using?
2.3.2
The text was updated successfully, but these errors were encountered: