---
title: "Creates a global static analyzer configuration."
method: POST
path: "/global-checker-configs"
tags: ["(Deprecated) Global static analyzer configurations"]
---

# Creates a global static analyzer configuration.

`POST /global-checker-configs`

## Request body

- CustomCheckerConfig
  - `defaultSeverity` 'FATAL' | 'ERROR' | 'WARNING' | 'INFO' — If your custom analyzer does not support severity levels for found issues or if they do not match FATAL|ERROR|WARNING|INFO, you can define which default severity violations should have.
  - `fileExtensionsToProcess` string — A list of file endings which should be analyzed, separated by whitespace. Example: js javascript
  - `globalAnalyzerId` integer — Reference a global analyzer configuration. Only possible when used on the repository level.
  - `id` integer — ID of the custom analyzer configuration. Only necessary when updating/deleting a configuration.
  - `issueParseRegex` string — A Java regular expression to parse the output of the tool. It should contain named groups for the severity level (if not provided you must specify a default severity below), the file path, the line number and the message. Example: (?<severity>.*?) (?<file>.*?):(?<line>\d+):\d+: (?<message>.*) will match "ERROR /path/to/HelloWorld.java:26:27: 42 is a magic number. [MagicNumber]"
  - `maxMergeErrors` integer — This is the maximum number of reported violations with severity ERROR or FATAL allowed to merge a pull request. Leave empty to always allow merging.
  - `name` string — This name will be used to report violations in the code of your pull requests.
  - `toolArguments` string — The arguments for the analyzer including a placeholder %f which will be replaced with the path to the file or %fs which will be replaced with a space-delimited list of all file paths to analyze (will only require one process to analyze your pull request compared to %f). Note that repository relative paths for config files etc. are also possible (see the following example where mycheckstyle.xml is taken from the repository). Example for using Checkstyle: -jar checkstyle-7.7-all.jar -c mycheckstyle.xml %fs
  - `toolCommand` string — The path to the tool to invoke, can either be absolute (e.g. /usr/local/bin/jscs) or relative to the repository (e.g., ./node_modules/.bin/eslint)

## Response `200`

Global static analyzer configuration created

- CustomCheckerConfig
  - `defaultSeverity` 'FATAL' | 'ERROR' | 'WARNING' | 'INFO' — If your custom analyzer does not support severity levels for found issues or if they do not match FATAL|ERROR|WARNING|INFO, you can define which default severity violations should have.
  - `fileExtensionsToProcess` string — A list of file endings which should be analyzed, separated by whitespace. Example: js javascript
  - `globalAnalyzerId` integer — Reference a global analyzer configuration. Only possible when used on the repository level.
  - `id` integer — ID of the custom analyzer configuration. Only necessary when updating/deleting a configuration.
  - `issueParseRegex` string — A Java regular expression to parse the output of the tool. It should contain named groups for the severity level (if not provided you must specify a default severity below), the file path, the line number and the message. Example: (?<severity>.*?) (?<file>.*?):(?<line>\d+):\d+: (?<message>.*) will match "ERROR /path/to/HelloWorld.java:26:27: 42 is a magic number. [MagicNumber]"
  - `maxMergeErrors` integer — This is the maximum number of reported violations with severity ERROR or FATAL allowed to merge a pull request. Leave empty to always allow merging.
  - `name` string — This name will be used to report violations in the code of your pull requests.
  - `toolArguments` string — The arguments for the analyzer including a placeholder %f which will be replaced with the path to the file or %fs which will be replaced with a space-delimited list of all file paths to analyze (will only require one process to analyze your pull request compared to %f). Note that repository relative paths for config files etc. are also possible (see the following example where mycheckstyle.xml is taken from the repository). Example for using Checkstyle: -jar checkstyle-7.7-all.jar -c mycheckstyle.xml %fs
  - `toolCommand` string — The path to the tool to invoke, can either be absolute (e.g. /usr/local/bin/jscs) or relative to the repository (e.g., ./node_modules/.bin/eslint)

## Other responses

- `401` — The currently authenticated user does not have ADMIN permissions
- `404` — The global static analyzer configuration does not exist

---

[API](https://skmtc.dev/mibexsoftware/apis/code-review-assistant-for-bitbucket-server-rest-api.md) · [All operations](https://skmtc.dev/mibexsoftware/apis/code-review-assistant-for-bitbucket-server-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/mibexsoftware/code-review-assistant-for-bitbucket-server-rest-api/revisions/9c894cb7039f/schema)
