-
Notifications
You must be signed in to change notification settings - Fork 760
Description
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
or printStackTrace()
), 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:
- more checks: default locale, no
System.out
/System.err
, orprintStackTrace()
- configurable "forbidden APIs" checks (à la DoNotCall, RestrictedAPI, JdkObsolete, DefaultCharset, or JavaTimeDefaultTimeZone) through simple text files (rather than writing dedicated Error Prone checks). Alternatively, make it dead-easy to build such checks (possibly using protobuf to store the forbidden signatures, à la ApiDiff).
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