Trivadis / plsql-cop-cli

db* CODECOP Command Line

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

propertyfile argument not working in Win10

ffm145 opened this issue · comments

My test folder structure looks like

  • C:\temp\tvdcc-2.3.1*.*
  • C:\temp\files*.pks

I've copied validators.jar (v1.5.0) into C:\temp\tvdcc-2.3.1\plugin and copied the default properties file content to C:\temp\tvdcc-2.3.1\plugin\TrivadisPlsqlNaming.properties.

When I run
C:\temp\tvdcc-2.3.1\tvdcc.cmd path=C:\temp\files validator=com.trivadis.tvdcc.validators.TrivadisGuidelines3Plus
everything works fine.
But if I add the propertyfile argument like
C:\temp\tvdcc-2.3.1\tvdcc.cmd path=C:\temp\files validator=com.trivadis.tvdcc.validators.TrivadisGuidelines3Plus propertyfile=C:\temp\tvdcc-2.3.1\plugin\TrivadisPlsqlNaming.properties
I get the following error:
Unknown option "PREFIX_RECORD_TYPE_NAME". Cannot set value "r_". Use -? to list valid options.

What is wrong with the command???

The property file may contain only options as properties that are listed when you run tvdcc -help.. These are:

  filter=<filter>        regular expression to filter files, e.g. "myfile.sql" or "(pks|pkb|pkg)$" or "^((?!guideline_7210_65).)*$"
  timeout=<seconds>      maximum seconds allowed to load and parse a file, e.g. 10
  complexity=<value>     list PL/SQL units with cyclomatic complexity greater than this value, e.g. 10
  output=<name>          file name incl. path of output file, e.g ./myreport.html or ./myreport.xlsx
  template=<name>        file name incl. path of XSL stylesheet to create HTML output, e.g ./myhtml.xsl
  excel={true|false}     create Excel output file, default is true
  html={true|false}      create HTML output file, default is true
  transonly={true|false} transform temporary XML file only, default is false
  cleanup={true|false}   remove temporary XML file, default is true
  check=<list>           comma separated list of guidelines, severities, characteristics to be checked,
                         e.g. "blocker, critical, major, efficiency, 1040", default all guidelines
                         guidelines: 1010, 1020, 1030, 1040, ..., 8410, 8510
                         severities: blocker, critical, major, minor, info
                         characteristics: changeability, efficiency, maintainability, portability,
                                          reliability, reusability, security, testability
                         invalid values are ignored
  skip=<list>            comma separated list of guidelines, serverities, characteristics not to be checked,
                         e.g. "7460, info, portability, testability", invalid values are ignored
  nosonar=false          ignore "-- NOSONAR" marker comments (do not suppress warnings)
  license=<name>         name incl. path to license file, default tvdcc.lic in the root folder
  validator=<name>       decendent of PLSQLJavaValidator and implements PLSQLCopValidator interface, 
                         default is com.trivadis.tvdcc.validators.TrivadisGuidelines3
  genmodel={true|false}  generate SonarQube XML model files, default is false.

Using other options results in the same errors as on the command line.

According the error message you provided

Unknown option "PREFIX_RECORD_TYPE_NAME". Cannot set value "r_". Use -? to list valid options.

I think you would like to pass the property file for the TrivadisPlsqlNaming validator. As documented there you need to defined this property file in your home directory ( ($HOME for Linux or macOS and %HOMEDRIVE%%HOMEPATH% for Windows) and the file must be named TrivadisPlsqlNaming.properties.

What is wrong with the command???

Actually nothing. I hope my explanation showed that.

No feedback after 20 days. Assumed answered.