https://github.com/mikybars/error-prone-gradle-demo
https://github.com/mikybars/error-prone-gradle-demo
error-prone gradle java refactoring refaster static-analysis
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/mikybars/error-prone-gradle-demo
- Owner: mikybars
- Created: 2023-05-25T05:53:02.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-05-25T09:09:54.000Z (about 3 years ago)
- Last Synced: 2025-04-02T04:58:06.291Z (about 1 year ago)
- Topics: error-prone, gradle, java, refactoring, refaster, static-analysis
- Language: Kotlin
- Homepage:
- Size: 61.5 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# error-prone-gradle-demo
> Error Prone is a static analysis tool for Java that catches common programming mistakes at compile-time
## Rationale
After watching a [presentation](https://www.youtube.com/watch?v=KPNimQMH0k4) showing off the possibilities of
[Error Prone](https://errorprone.info/) I decided to give it a go and set up a little POC project reflecting
my current stack, namely Java 17 and Gradle 8. Common use cases implemented which are required for Real-World™
projects are the following:
* Enable or disable specific Error Prone checks (whitelist vs blacklist)
* Enable or disable specific Refaster rules (whitelist vs blacklist)
* Apply additional bug checks and Refaster rules from the [Error Prone Support](https://error-prone.picnic.tech/) project
* Apply custom Refaster rules defined inside the project
* Suppression of false positives
* Disable Error Prone in test code
* Multiple excluded paths
* Enable [patch mode](https://errorprone.info/docs/patching) by using a build flag (= Gradle property)
## Usage
```bash
./gradlew build [-PepAutoPatch]
```
## Links
* https://www.youtube.com/live/KPNimQMH0k4
* https://errorprone.info/
* https://error-prone.picnic.tech/
* https://github.com/tbroyer/gradle-errorprone-plugin