You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

In this section:

jtest.fail

This setting enables or disables failing the build by returning a non-zero exit code if any violation is reported.

Acceptable Values

trueFailing the build is enabled.
falseFailing the build is disabled.

jtest.show.settings

This setting specifies enables or disables printing the current settings and customizations, including the source of each configuration entry (for example, .properties file).

Acceptable Values

truePriting the current settings is enabled.
falsePriting the current settings is disabled.

jtest.data.additional

This setting specifies the path to the additional json.data file. You can specify more than one file by providing a comma-separated list of file paths.

Acceptable Values

[path]The path to the additional json.data file(s).

(info) Use double backslashes to specify the file path on Windows.

jtest.input.filter

This setting enables or disables limiting the scope of analysis to specific files in each package. By default, Jtest will filter out and analyze the biggest file in each package, but you can configure the jtest.input.filter.files option to specify other files in each package to be filtered out.

Acceptable Values

trueFiltering files is enabled.
falseDefault. Filtering files is disabled


Example Usage

The following configuration limits the scope of analysis to one file per package by filtering out the biggest file in each package in the project (the jtest.input.filter.files option is not configured):

jtest.input.filter=true

jtest.input.filter.files

This setting specifies which files will be filtered out from each package in the project, and then analyzed by Jtest. It requires the jtest.input.filter option to be set to true. Use a comma-separated list to specify more than one acceptable value.

Acceptable Values

totalPerPackage

Specifies the number of files that will be filtered. For example:

totalPerPackage:5 - filters out 5 biggest files from a package

Setting totalPerPackage to 0 disables filtering out a specific number of files. As a result, all files in a package will be analyzed.

size

Specifies the size of the files that will be filtered out (by default, in kilobytes, but you can explicitly specify the following units: b, m, g). For example:

size>10 - filters out files bigger than 10 kilobytes

size<10m - filters out files smaller than 10 megabytes

date

Filters out the files that were modified within a specific date range. For example:

date>2001-01-01 - filers out files last modified after January 1, 2001 00:00 a.m.

Sorting by date

By default, files are sorted by size. For example, the following set of values will filter out and analyze 5 biggest files that were last modified after January 1, 2016 (even if the overall number of such files is higher): totalPerPackage:5,date>2016-01-01

You can enable sorting files by date by adding the sort:date value to the comma-separated list of values. For example, the following set of values will filter out and analyze 10 files that were most recently modified: sort:date,totalPerPackage:10

Example Usage

The following configuration will filter out from each package and analyze 5 biggest files that are bigger than 2 kilobytes and smaller than 5 kilobytes, and were last modified on November 1, 2016:

jtest.input.filter.files=totalPerPackage:5,size>2,size<5,date>2016-11-01,date<2016-11-02

If you pass the option with the with the command line switch -property, ensure that the values are in quotation marks:

-property jtest.input.filter.files="totalPerPackage:5,size>2,date>2016-11-01,date<2016-11-02"

  • No labels