-
Notifications
You must be signed in to change notification settings - Fork 7
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
Add -Werror for javac #107
base: master
Are you sure you want to change the base?
Changes from 8 commits
2e0a364
3ce7e93
b16d41e
f14c539
f293923
a519178
a10d195
fb4d27c
6517fba
75423ca
309184b
a3d4fe0
5e76579
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,6 +48,9 @@ subprojects { proj -> | |
proj.dependencies { | ||
errorprone deps.build.errorProneCore | ||
errorproneJavac deps.build.errorProneJavac | ||
// just to prevent javac warnings, we currently pass "-Werror" as compiler arguments, | ||
// all warnings must be resolved. | ||
compileOnly deps.build.errorProneCoreOld | ||
Comment on lines
+51
to
+53
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't understand this change There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it seems once error prone is in the path we get the error below for compiling
Added a dependency to resolve this issue. |
||
if(proj.name != "ban-mutable-static"){ | ||
annotationProcessor project(":checks:ban-mutable-static") | ||
} | ||
|
@@ -66,6 +69,7 @@ subprojects { proj -> | |
} | ||
} | ||
} | ||
options.compilerArgs += '-Werror' | ||
} | ||
|
||
repositories { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -64,6 +64,7 @@ public Modification visit(NodeWithAnnotations<?> node, Range range) { | |
} | ||
|
||
@Override | ||
@SuppressWarnings("unchecked") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Again why suppress There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @msridhar The only way to resolve this warning is to change the json dependency to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just created a followup PR that removes the added |
||
public JSONObject getJson() { | ||
JSONObject res = super.getJson(); | ||
res.put("INJECT", false); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not just fix the error instead of suppressing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't know how I can resolve the warning for creating array of
LinkedLists
. Since I was confident that there will be no problem with the code I just silenced it.However, I just changed it to use List of Lists 6517fba, I don't think this will impact the performance. But if you think this will actually impact the performance, please let me know and I will undo this. Thank you.