Java icon indicating copy to clipboard operation
Java copied to clipboard

style: enable compiler warnings and treat them as errors

Open vil02 opened this issue 1 year ago • 1 comments

This PR enables the compiler warnings and treats them as errors. The goal is to remove all of the lines suppressing some of the warnings, i.e.

<arg>-Xlint:-auxiliaryclass</arg>
<arg>-Xlint:-rawtypes</arg>
<arg>-Xlint:-serial</arg>
<arg>-Xlint:-try</arg>
<arg>-Xlint:-unchecked</arg>

In case of Java 21 (#5163) two additional warnings needs to be suppressed (Java 17 does not know them):

<arg>-Xlint:-lossy-conversions</arg>
<arg>-Xlint:-this-escape</arg>

Similar to:

  • #5110
  • #5122
  • #5155
  • [x] I have read CONTRIBUTING.md.
  • [x] This pull request is all my own work -- I have not plagiarized it.
  • [x] All filenames are in PascalCase.
  • [x] All functions and variable names follow Java naming conventions.
  • [x] All new algorithms have a URL in their comments that points to Wikipedia or other similar explanations.
  • [x] All new code is formatted with clang-format -i --style=file path/to/your/file.java

vil02 avatar May 18 '24 20:05 vil02

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 38.58%. Comparing base (bf9d0ed) to head (46d804c).

Additional details and impacted files
@@            Coverage Diff            @@
##             master    #5165   +/-   ##
=========================================
  Coverage     38.57%   38.58%           
- Complexity     2377     2379    +2     
=========================================
  Files           516      516           
  Lines         15315    15315           
  Branches       2957     2957           
=========================================
+ Hits           5908     5909    +1     
  Misses         9121     9121           
+ Partials        286      285    -1     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov-commenter avatar May 18 '24 20:05 codecov-commenter