-
Notifications
You must be signed in to change notification settings - Fork 26
Property list
The OpenEdge plugin for SonarQube can be configured through the following properties (on top of the standard SonarQube properties):
-
sonar.oe.propath
: comma-separated list of PL or directories -
sonar.oe.binaries
: comma-separated list of build directories (where rcode can be found) -
sonar.oe.dotpct
: comma-separated list of .pct directories (if using a different directory in PCTCompile) -
sonar.oe.dlc
: OpenEdge installation directory -
sonar.oe.propath.dlc=true|false
: append $DLC/gui, $DLC/tty and $DLC/src to the propath -
sonar.oe.databases
: comma-separated list of full DF files. DB logical name is identical to the file name. This can be overridden by appending:logicalName
after the file name. -
sonar.oe.aliases
: semicolon-separated list of entries, each entry being a comma-separated list of aliases (first entry is the db name) -
sonar.oe.file.suffixes
: control file extensions analyzed by the SonarQube scanner (default value:p,w,i,cls
) -
sonar.oe.include.suffixes
: control include file extensions, with no rule execution (default value:i
) -
sonar.oe.coverage.profiler.dirs
: comma-separated list of directories where profiler files are stored (usually the value of outputDir in Profiler node) -
sonar.oe.backslash.escape=true|false
: enable backslash as an escape character on Windows -
sonar.oe.analytics=true|false
: set to false to disable analytics (ping to http://analytics.rssw.eu) -
sonar.oe.proparse.error.stacktrace
: set to false to disable full stack trace in case of parser error -
sonar.oe.xcode.skip
: set to false to stop the parser when it reaches an xcode'd file. Default behavior converts xcode'd file to a single space character. -
sonar.oe.rtb
: set to true to enable Roundtable compatibility mode -
sonar.oe.assembly.catalog
: path tocatalog.json
(list of all .Net classes that are available in this session). File can be generated by AssemblyCatalog task. -
sonar.oe.issues.annotations
: comma-separated list of annotations which can be assigned to code blocks in order to prevent any issue from being reported. Default value is@InitializeComponent
.
// Using sonar.oe.issues.annotations=@NoSonar
procedure foobar:
def var xyz as int. // UnusedVariable will be reported, not inside annotated block
@NoSonar.
do:
def var abc as int. // UnusedVariable will not be reported, as it's inside annotated block
repeat:
def var def as int. // Also not reported, as parent block is annotated
end.
end.
end procedure.
Some parts of your code can be analyzed with a different propath and different database connections. Implementation is very simple, and only meant for simple cases such as additional directories in the propath or additional connections / aliases for a limited set of files.
Modules have to be defined with sonar.oe.moduleX.pattern
where X have to start at 1. Once a module is defined, it is possible to use sonar.oe.moduleX.databases
, sonar.oe.moduleX.aliases
and sonar.oe.moduleX.propath
. If a property is not defined, then the global value is being used. You can define as many modules as you want, just increase the module number by 1.
During the analysis, file names are compared with the pattern of all modules (using the order in which they are defined). If the file name matches a pattern (first match wins), then it will be analyzed with those specific values (propath and db connections). If the file name doesn't match any pattern, then it will be analyzed with the default parameters.
Example:
sonar.sources=src
sonar.oe.databases=src/schema/app.df
sonar.oe.propath=src
sonar.oe.module1.pattern=src/security/**
sonar.oe.module1.databases=src/schema/sec.df
sonar.oe.module2.pattern=src/acct/**
sonar.oe.module2.propath=src/acct/inc,src/general
- All files in src/security will be analyzed with a DB connection to sec, and default propath
- All files in src/acct will be analyzed with a different propath, and the default DB connection
- Anything else will be analyzed with the default DB connection and
src
propath
-
sonar.oe.preprocessor.opsys
: can be set toUNIX
orWINDOWS
. Default value depends on your OS. -
sonar.oe.preprocessor.window-system
: can be set to any value. Default value isMS-WIN95
on Windows,TTY
on UNIX. -
sonar.oe.preprocessor.proversion
: can be set to any value. Default value is11.7
. -
sonar.oe.preprocessor.batch-mode
: can be set to true or false. Default value istrue
. -
sonar.oe.preprocessor.process-architecture
: can be set to any value. Default value is64
. -
sonar.oe.proparse.tokenStartChars
: list of characters (no separator) that can start function or procedure names. Valid characters are&
,/
,^
,;
,*
,!
,#
,%
and backtick. Default value is empty.
-
sonar.oe.proparse.debug
: generate HTML description of abstract syntax tree of each OpenEdge procedure. Files are generated in.proparse
directory -
sonar.oe.skipProparse
: skip abstract syntax tree generation and rules execution on OpenEdge procedures and classes -
sonar.oe.proparse.recover
: set to true to allow token injection / deletion when parsing code
-
sonar.oe.cpd.annotations
: comma-separated list of annotations telling the CPD engine to skip code blocks. Example :Progress.Lang.Generated,InitializeComponent
-
sonar.oe.cpd.skip_methods
: comma-separated list of method names telling the CPD engine to entirely skip a method -
sonar.oe.cpd.skip_procedures
: comma-separated list of procedure and function names telling the CPD engine to entirely skip a procedure or function -
sonar.oe.simplecpd
: set to true to use a simpler CPD engine, which doesn't require access to the syntax tree. Only relevant when the majority of the codebase can't be compiled with the standard propath and/or database connections. Requires propertysonar.oe.skipProparse
to be set totrue
. Available since version 2.7.
The following properties are standard SonarQube properties
-
sonar.cpd.oe.minimumtokens
andsonar.cpd.oe.minimumLines
: a code section is considered duplicated as soon as there are at least 100 duplicated tokens in a row (override withsonar.cpd.${language}.minimumTokens
), over at least 10 lines of code (override withsonar.cpd.${language}.minimumLines
).
Removed in 2.11, filter is always active
sonar.oe.filter.invalidxref
: turn on byte filtering on XREF filessonar.oe.filter.invalidxref.bytes
: comma-separated list of bytes to be filtered out of XREF files, such as1-5,9,11
, as OpenEdge can generate invalid XML files. A common example is ADM2 in which strings contains the 0x01 byte, which is directly copied in the XREF file. Default value is1-4
.
© Riverside Software 2013-2024