Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

javac and scalac warnings as errors only for certain types

I know that with -Werror and -Xfatal-warnings I can make warnings as errors, but is it possible to still see all warnings in the compilation output, but only make a few of them become errors?

like image 617
dfritsi Avatar asked Mar 02 '16 18:03

dfritsi


1 Answers

I don't think so, with scalac alone.

You could perhaps add a post-build check to your build scripts which grep the output for warnings about your critical classes and fail the build if any are found?

like image 77
Rich Avatar answered Nov 04 '22 16:11

Rich