Codenarc Analyzes Our Code For Defects, Bad Practices, Inconsistencies, Style
Codenarc Analyzes Our Code For Defects, Bad Practices, Inconsistencies, Style
Codenarc Analyzes Our Code For Defects, Bad Practices, Inconsistencies, Style
issues and more. A flexible framework for rules, rulesets and custom rules means
it's easy to configure CodeNarc to fit into your project.
1. Please take the files from codenarc open source (the Apache Ant in this folder is
already there if you have setup the GW studio)
4. If you have already done the environment setup for Guidewire and will debug your
Gosu classes only than skip the below step.
Set up environment variable for user variables as follows with below key value pair,
Please make sure you are referring to the correct path while configuring environment
variable
ANT_HOME
C:\Apache\apache-ant-1.8.2
JAVA_HOME
C:\Program Files\Java\jdk1.7.0_51
path
%JAVA_HOME%\bin;%ANT_HOME%\bin;
We can also Change the report name by going to the Line no -13.
COMMAND:
ant gosu-codenarc -v -f build.xml –Dgosu-codenarc.report.name=MyReportName
C:\Ent-Std\WorkSpace-8.0\PolicyCenter\modules\ant\tools\gosu-
codenarc\reports,
There must be a report created with name GosuCodeNarcReport.html. There are some
sample reports for reference in the same location.
Note:
Below is the location where the you can find the gosuruleset.xml which consists
all the configurable gosu parameters and those parameters are highlighted in the
report which needs to be corrected
Mark that in the build.xml we can define the type of file which will be scanned in
the defined package, right now we are able to do for “gs” and “gsx” only.