zowe / sample-spring-boot-api-service

Zowe REST API service SDK and sample API service that integrates with Zowe API Mediation Layer
Other
26 stars 18 forks source link

Sonarcloud #94

Closed plavjanik closed 4 years ago

plavjanik commented 4 years ago

This PR introduces Sonar scans into the build pipeline and the quality badge.

It also fixes major issues found by Sonar and appeared on the main Sonarcloud page. They were not critical in their particular cases but they were not the best coding practices and they should be fixed.

The code blocks that have bad diffs are moving closeable resources to the try block which resulted in a different indentation of the code.

This PR removed all issues in types:

image

codecov[bot] commented 4 years ago

Codecov Report

:exclamation: No coverage uploaded for pull request base (master@6d5d787). Click here to learn what that means. The diff coverage is 86.36%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master      #94   +/-   ##
=========================================
  Coverage          ?   74.69%           
  Complexity        ?      298           
=========================================
  Files             ?       69           
  Lines             ?     1158           
  Branches          ?      117           
=========================================
  Hits              ?      865           
  Misses            ?      240           
  Partials          ?       53
Impacted Files Coverage Δ Complexity Δ
...ommons/zos/security/platform/MockPlatformUser.java 80% <ø> (ø) 5 <0> (?)
...ava/org/zowe/sample/apiservice/CsrfController.java 100% <ø> (ø) 2 <0> (?)
...owe/commons/spring/ServiceStartupEventHandler.java 0% <0%> (ø) 0 <0> (?)
...c/main/java/org/zowe/commons/zos/LibExtractor.java 0% <0%> (ø) 0 <0> (?)
...ecurity/service/ZosJniPlatformSecurityService.java 0% <0%> (ø) 0 <0> (?)
...e/commons/spring/EnableEurekaLoggingTimerTask.java 100% <100%> (ø) 4 <1> (?)
.../org/zowe/sample/apiservice/wto/WtoController.java 100% <100%> (ø) 2 <1> (?)
...ommons/zos/security/platform/PlatformAckErrno.java 100% <100%> (ø) 4 <1> (?)
...ommons/zos/security/platform/PlatformPwdErrno.java 100% <100%> (ø) 4 <1> (?)
.../java/org/zowe/commons/error/ErrorServiceImpl.java 80.98% <100%> (ø) 26 <1> (?)
... and 9 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 6d5d787...af78b4a. Read the comment docs.