Gradlew build error

 ./gradlew build

Task :qmoney:pmdMain
This analysis could be faster, please consider using Incremental Analysis: https://pmd.github.io/pmd-6.10.0/pmd_userdocs_increme
ntal_analysis.html
5 PMD rule violations were found. See the report at: file:///home/crio-user/workspace/someshwar-17u504-viit-ac-ME_QMONEY/qmoney/
build/reports/pmd/main.html

> Task :qmoney:spotbugsMain FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':qmoney:spotbugsMain'.
> SpotBugs rule violations were found. See the report at: file:///home/crio-user/workspace/someshwar-17u504-viit-ac-ME_QMONEY/qmoney/build/reports/spotbugs/main.html

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/5.2.1/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 19s
13 actionable tasks: 6 executed, 7 up-to-date

What does spotbugs mean? I was getting lexicographical errors even after organizing import and formatting data. Had length of sentences more than 100 characters, had to turn the string in args0path into concatenated strings of smaller size and arranged the import files according to the errors I got. Then I get this error. How do i resolve this?

see the html file in the path given for details for the error

Do I have to view the HTML code as it is? Or is there any way to open the file in a new tab

try opening the html file in a browser, you will get detail view about the error

Yeah How? Do i have to download the code and paste it in a new file? :confused:

yes… that’s the only way I came up with :neutral_face:

actually open the html file in the code editor, copy the code, paste it into a new file in your local desktop, then open it using a browser

Hi @someshwarrc,

Apart from the unit testing that happens, the ME involves three checks to improve our coding habits for style and correctness

  1. CheckStyle - includes coding style checks like thresholding code line lengths and ordering as you mentioned

  2. PMD - checks for common programming flaws like having unused variables, redefining variables etc.

  3. SpotBugs - reports parts of our code that may lead to a bug like using the output of a method without checking if the value is null

And about viewing the html file, as @jyotirmoy-paul rightly pointed out we can copy-paste the content to our m/c and open using browser. Another workaround is vscode has extensions, you can go there using the left nav bar. There’s one called Browser Preview and Live Server. Browser preview opens up a browser window inside the workspace and should be able to open the html files in the workspace, but I couldn’t figure out how, poor me :sweat_smile:. But, Live server assigns a port for the workspace file directory and we can use that port with the localhost address in the browser opened by Browser Preview to display the html files

1 Like