TICSQServer
is the main application that is used to fill the
quality database. It uses some auxiliary applications that are described
below. TICSQServer
is meant to be run regularly, e.g., on a
daily (nightly) basis.
The steps of a TICSQServer
run are described below. A full
overview of all possible command line options is also given.
-nobackup
]
-nobackup
option.
-calc PREPARE
]
-calc CHANGEDFILES
]
Update the file information in the database.
-calc BUILDRELATIONS
]
-calc INCLUDERELATIONS
]
-calc LOC
]
-calc ELOC
]
-calc GLOC
]
-calc LINESADDED
]
-calc LINESDELETED
]
-calc LINESCHANGED
]
-calc CHANGERATE
]
-calc ACCULINESADDED
]
-calc ACCULINESDELETED
]
-calc ACCULINESCHANGED
]
-calc ACCUCHANGERATE
]
-calc UNITTESTCOVERAGE
/ -calc UTC
]
-calc INTEGRATIONTESTCOVERAGE
/ -calc ITC
]
-calc SYSTEMTESTCOVERAGE
/ -calc STC
]
-calc TOTALTESTCOVERAGE
/ -calc TTC
]
-calc CODINGSTANDARD
/ -calc CS
]
-calc COMPILERWARNING
/ -calc CW
]
-calc ABSTRACTINTERPRETATION
/ -calc AI
]
-calc SECURITY
/ -calc SEC
]
-calc CYCLOMATICCOMPLEXITY
/ -calc CY
]
-calc AVGCYCLOMATICCOMPLEXITY
]
-calc MAXCYCLOMATICCOMPLEXITY
]
-calc FANOUT
]
-calc DEADCODE
]
-calc DUPLICATEDCODE
/ -calc DUP
]
-calc FIXRATE
]
-calc ACCUFIXRATE
]
-calc FINALIZE
]
-calc POSTANA
]
The following shortcuts can be used to combine common steps at the beginning and end of the analysis.
-calc BEGIN
PREPARE
,
CHANGEDFILES
, BUILDRELATIONS
and
INCLUDERELATIONS
.
-calc END
FINALIZE
, and
POSTANA
.
TICSQServer is able to detect certain changes in the analysis environment automatically, and will trigger automatic recalculations to bring your analysis data up to date to match the new environment.
The following triggers are available for all TQI metrics:
The following triggers are available for violation-based metrics:
If this automatic recalculation is not desired behaviour (for instance if a
full recalculation takes very long and this should only be done on schedule)
this can be disabled via the -noautorecalc
option in the
TICSQServer invocation.
TICSQServer is the main program to fill the quality database.
TICSQServer runs for the project specified on the command line via the
-project
option. For a project, new and changed files are
processed first, followed by any files that failed to be correctly processed
the last time.
TICSQServer processes files in this order for the following reason. When the time restrictions for the run are not large enough to analyze both the new and previously failed files, this arrangement allows all new files to be analyzed first. Since files that failed the previous run are likely to fail again (unless proper action has been taken), processing such files mostly consumes time without providing new data.
Before starting the update of the quality database, TICSQServer optionally performs the following steps (in this order).
After finishing the update of the quality database, TICSQServer optionally performs a post analysis step.
TICSQServer [option...] [inputfile...]
TICSQServer accepts a list of inputfiles.
Each inputfile
is a file or directory that
@
' to denote a project fileNote that all specified files must be within one of the specified views of the project (in the SERVER.yaml project configuration).
The following TICSQServer options are allowed.
- -archivefile file
- use the given archive file for the archive extraction
- -branchname branch name
- calculate only the branch with branch name
- -calc metric
- calculate the specified (comma separated) metric type(s) [default: on]
- -config string
- use the given compiler configuration
- -deltaonly
- show only new violations relative to the database
- -err file
- write error messages to the specified file
- -exitsqa
- use the QA acceptation as exit code
- -help
- show this help info
- -language language
- calculate only files of the given language
- -level int
- show violations upto the specified level
- -log int
- show diagnostic messages upto the specified log level
- -logdir dir
- use the specified directory for server log files
- -new
- only check files that are new to the archive
- -noautorecalc
- do not trigger automatic recalculation due to ruleset changes or checker upgrades
- -nobackup
- do not backup the current version of the database
- -nocalc metric
- do not calculate the specified (comma separated) metric type(s)
- -noclobber
- do not overwrite the global log file (but append to it instead)
- -nodelta
- do not show deltas
- -nologo
- suppress TICS logo output
- -nomail
- do not send error or status mails
- -norecalc metric
- do not recalculate the specified (comma separated) metric type(s) for unchanged files
- -nosanity
- do not perform sanity checks
- -nowarn
- suppress all warnings
- -overviews
- show violation overview tables [default: on]
- -project string
- quality database to update
- -recalc metric
- recalculate the specified (comma separated) metric type(s) for unchanged files
- -results
- show violation messages [default: on]
- -setbaseline name[,delta:(0|1)][,plotline:(0|1)]
- set baseline name for a project
- -shownew
- annotate new violations relative to the database
- -showresolved
- show resolved violations in violation overview
- -showsuppressions
- show suppressed violations in violation overview
- -showsynopsis
- show rule synopsis in violation overview [default: on]
- -sort level|linenr|new
- sort the violations according to the specified criterion (default 'linenr')
- -st
- dump stack trace in case of errors
- -timeinfo
- show timing information on individual process stages [default: on]
- -tmpdir dir
- use the specified directory for intermediate files
- -today yyyy-mm-dd|yyyy-mm-dd HH:MM:SS
- run with the given timestamp as start date/time
- -totaloverviews
- show cumulative violation overview tables [default: on]
- -version
- show version info and exit
TICSQServer provides information about the status of the run as follows. In
case of a successful run the exit status is 0
. In case of an
unsuccessful run, the exit code is an integer unequal to 0
. The
exact value of a non-zero exit code is subject to the OS and the shell
interpreter in which the TICSQServer command is invoked.
Note that the semantics of the exit status is changed when running with the
-exitsqa
option. When running with the -exitsqa
option, the exit value may still be non-zero in case of a "successful" run.
Namely, in case the run does not satisfy the QA criteria (i.e., fails to meet
the required QA targets).
The TICS Analyzer needs to authenticate itself when communicating with the viewer. Please refer to configuring an authentication token.