RussellSpitzer commented on a change in pull request #1427:
URL: https://github.com/apache/iceberg/pull/1427#discussion_r484017435



##########
File path: build.gradle
##########
@@ -174,6 +174,7 @@ project(':iceberg-bundled-guava') {
 project(':iceberg-api') {
   dependencies {
     compile project(path: ':iceberg-bundled-guava', configuration: 'shadow')
+    compileOnly "com.google.errorprone:error_prone_annotations:2.3.3"

Review comment:
       They are applied to all the compileJava tasks in the project. So running 
any compileJava task will cause error-prone to also be run. So as long as the 
class file is compiled on your run of "build" or classes or any command, it 
will log warnings and such. There is no separate task to only run error-prone. 
We have to set another config option if we want to treat warnings as errors. 
   
   For example if you run the `clean testClasses` now you will see things like 
   
   ```
   
/Users/russellspitzer/repos/iceberg/spark/src/main/java/org/apache/iceberg/spark/source/RowDataRewriter.java:92:
 warning: [ThrowSpecificity] Prefer to declare more specific throws types than 
Exception and Throwable. When methods are updated to throw new checked 
exceptions they expect callers to handle failure types explicitly. Throwing 
broad types defeats the type system. By throwing the most specific types 
possible we leverage existing compiler functionality to detect unreachable code.
     private List<DataFile> rewriteDataForTask(CombinedScanTask task) throws 
Exception {
   ```
   
   Which is an error-prone based warning.
   
   I was wrong about spot bugs, it is not in the baseline plugin. I misread 
spotless, which is the formatting tool included in the baseline plugin.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to