This section mentions how the data is stored in JSON (JavaScript Object Notation) and it can be customized by adding our own JSON objects.
Code Quality JSON structure
This section helps you to understand different field types, its description, its importance, and default values that areused in the JSON file.
Field Type | Usage | Type | Default |
---|---|---|---|
gammaAccess | This is the name of code quality project. | ||
url | Specifies URL of the website | String | Empty |
userName | Stores user name for basic authentication to connect to the remote machine | String | Empty |
password | Stores password for basic authentication to connect to the remote machine. User can access either using username-password or by adding token for authentication. | String | Empty |
token | Stores token for basic authentication to connect to the remote machine. User can access either using username-password or by adding token for authentication. | String | Empty |
repositories | Specifies the repository information that will be scanned during your analysis process. For more information, refer this article | ||
dataDir | This is used to store the temporary files. | String | Empty |
uid | Stores repository uid which is unique for each repository | String | Saved from UI |
projectName | Specifies the repository name | Saved from UI | |
sources | Path/directories/files that can be scanned during your analysis process. For more information, see as | ||
baseDir | This is a base directory where source code resists. Moreover, this is a kind of main directory where all the operations such as cloning, scans, etc is performed. | String | Empty |
exclusions | Specifies list of files/directories/languages that needs to be excluded from your analysis. | Array | Empty |
settings | Specifies some additional options that can be used for scan configuration scanning process. | ||
additionalOptions | Specifies the list or lists of additional options that needs to be scanned. | Array | Empty |
includePaths | Specifies the file or list of files that needs to be scanned. | Array | Empty |
modules | Modules can be used for scanning process. For more information, refer this article . | ||
codeissues | This is a type of the module. This section is used to enabling/disabling code checker configuration. For more information, refer this article. | ||
unittest | Specifies the input data value. For e.g. the input can be in CSV/XML or any other format. | List | |
coverage | Specifies the coverage information across different modules. For more information, refer this link. | List | |
relevance | Specifies the name of code issue. | List | |
name | Specifies the name that can have multiple values such as codeissues, unittest, coverage or relevance. | List | Saved from UI |
enabled | Specifies whether the code checker is enabled or not. | Boolean | Saved from UI |
config | Specifies the configuration for that particular code checker | ||
rules | Specifies the rules for code issue | Array | |
options | These include additional options for code checkers like PMD. | ||
name | Specify the rule name for different modules. | String | Saved from UI |
type | Specifies the type of module. | String | Saved from UI |
value | Specifies the value such as integer or string for that particular module. | String | Saved from UI |
required | Specifies whether this module should be required while scanning and its value can be true or false. | Boolean | Saved from UI |
Sample JSON file
BrowserStack Code Quality JSON helps you to construct a data hierarchy such as: