pushtorefresh / javac-warning-annotation Goto Github PK
View Code? Open in Web Editor NEWLightweight javac @Warning annotation
License: Apache License 2.0
Lightweight javac @Warning annotation
License: Apache License 2.0
Immediately add annotation for auto-generated code (override, anonymous class impl, etc) with empty blocks to be sure, that you won't forget to implement them later
Add possibilty to choose the level of message in the compiler by adding a attribute in the annotation Warningin order to be pass as javax.tools.Diagnostic.Kind(ERROR, WARNING, MANDATORY_WARNING, NOTE, OTHER)
Let of course WARNING by default.
If your are interested to add this feature and release it after, I can do the PR.
I've added the following javac-warning-annotation
coordinated into my build.gradle
file.
// https://mvnrepository.com/artifact/com.pushtorefresh/javac-warning-annotation
compile group: 'com.pushtorefresh', name: 'javac-warning-annotation', version: '1.0.0'
I was getting compiler errors for the @Warning(...)
annotation with the provided
scope. Errors went away when I put the dependency into compileOnly
.
When I build, I am not seeing a warning on the class I used it on. Is the "provided
" scope the only way the annotation will work? I didn't tink that would make much difference one way or the other.
I noticed that you had some to-do with annotations. This is how I set-up the configurations
following below. The two things to ask about are the:
annotationProcessor
andlombok
I wondered if either of these are going to mess-up the @Warning
?
dep_javacWarning = "com.pushtorefresh:javac-warning-annotation:1.0.0"
:
configurations {
annotationProcessor
provided
}
dependencies
{
provided (
dep_javacWarning // <-- Compile errors on @Warning
)
compileOnly (
dep_lombok, // Must come first
dep_javacWarning // <-- Compiles clean with the entry here.
)
:
}
Many thanks ....
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.