TICSQServer is the main application that is used to fill the quality database.
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.
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 TICS Analyzer needs to authenticate itself when communicating with the viewer. Please refer to configuring an authentication token.
TICSQServer controls which TQI version should be used by the viewer to compute the TQI. Each time an analysis is performed, TICSQServer puts the TQI version that should be used for that analysis in the database. This is always the latest TQI version that TICSQServer supports.
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).
If you encounter an issue with TICSQServer and report this to your TICS representative, it can be that you are asked to provide a temporary directory or tmpdir of your run. This temporary directory contains various artifacts of the TICS run and log files containing all actions TICS has taken. As such, this directory contains useful debugging information for the TIOBE service engineer and the TICS development team to diagnose and resolve your issue. Dependent on your preferred way of working, there are two ways to generate this directory.
To generate a temporary directory from the command line, add the following
argument to your command line invocation to write a temporary directory to the
location of $TMPDIR.
TICSQServer $(your_args_here) -tmpdir $TMPDIR $(your_files_here).
So, to give an example of what this would look like if you wanted to write your
temporary directory to F:/tmp:
TICSQServer -project AppDatabase -recalc BEGIN,CS,END -tmpdir F:/tmp AppDatabaseClass.java
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 step:
After finishing the update of the quality database, TICSQServer optionally performs a post analysis step:
-nobackup]
-nobackup option.
-calc PREPARE]
-calc CHANGEDFILES]
Update the file information in the database.
-calc BUILDRELATIONS]
-calc BUILDRELATIONS will
also take individual changed source files into account, by doing a quick
search of which potential makefile is likely to contain it.
-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.
By using the -language option, it is possible to run metric
analysis steps only for a set of languages. This allows you to save time on a
run if you are currently only interested in new data for certain languages.
For instance, -language JAVA,PYTHON will only run analyzers for the
Java and Python code in your archive.
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 automatic recalculations are not desired behaviour (for instance if a
full recalculation takes very long and this should only be done on schedule)
these can be disabled via the -noautorecalc option in the
TICSQServer invocation. This command line option will also override any
configuration options that enable recalculations.
To speed up your analysis, it can be useful to run multiple TICSQServer instances in parallel by
using the -parallel command line flag. Currently, it is possible to run TICSQServer
in parallel for all analysis metrics, while for all the auxiliary actions it is not possible.
-parallel option is not an internal option to
make use of multithreading! Instead, this is used to allow multiple TICSQServer processes to run
in parallel on the same database.
The actions that are currently not possible to run in parallel are the
CHANGEDFILES, BUILDRELATIONS, INCLUDERELATIONS
and FINALIZE actions.
CHANGEDFILES, BUILDRELATIONS,
INCLUDERELATIONS) or take actions that should only be done after all metrics are done
(FINALIZE). If you run any of these together with the -parallel option or use any aggregators
containing these (BEGIN, END, ALL) TICS will fail with
an error message disallowing these options.
To give an idea of how you can parallelize your TICS runs, see the following
image. This shows how you would set it up; first a run with -calc BEGIN,
then a series of runs with -parallel and finally a -calc END.

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