You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(analyze): exit code mask configuration for code analysis
Configure which message types should **not** influence the exit code of `robotcode analyze code`, allowing granular control over CI/CD pipeline behavior or pre-commit hooks.
**Configuration File (`robot.toml`)**
```toml
[tool.robotcode-analyze.code]
exit-code-mask = ["error", "warn"]
```
**Command Line Options**
```
robotcode analyze code --exit-code-mask error,warn # or -xm
robotcode analyze code --extend-exit-code-mask info # or -xe
```
- `-xm` (or `--exit-code-mask`) overwrites the configuration in `robot.toml`
- `-xe` (or `--extend-exit-code-mask`) extends the configuration in `robot.toml`
- Both options can be specified multiple times or with comma-separated values:
```
robotcode analyze code -xm error -xm warn # multiple options
robotcode analyze code -xm error,warn # comma-separated
```
**Behavior**
- Message types in the mask are ignored when determining exit code
- Available types: `error`, `warn`/`warning`, `info`/`information`, `hint`
- Special value `all` ignores all message types (always exit code 0)
- Without configuration, all message types affect the exit code
**Example**
```toml
# In robot.toml - Ignore warnings but let errors affect exit code
[tool.robotcode-analyze.code]
exit-code-mask = ["warn"]
```
```bash
# Using short options
robotcode analyze code -xm error,hint # Overwrites robot.toml config
robotcode analyze code -xe info -xe hint # Extends robot.toml config with multiple types
robotcode analyze code -xm all # Always exit with code 0
```
closes#358
"description": "Specifies the exit code mask for the code analysis.\nThis is useful if you want to ignore certain types of diagnostics in the result code.\n\nExamples:\n```toml\n[tool.robotcode-analyze.code]\nexit_code_mask = [\"error\", \"warn\"]\n```\n",
239
+
"items": {
240
+
"enum": [
241
+
"error",
242
+
"warn",
243
+
"warning",
244
+
"info",
245
+
"information",
246
+
"hint"
247
+
],
248
+
"type": "string"
249
+
},
250
+
"title": "Exit code mask",
251
+
"type": [
252
+
"array",
253
+
"null"
254
+
]
255
+
},
256
+
"extend-exit-code-mask": {
257
+
"default": null,
258
+
"description": "Extend the exit code mask setting.",
0 commit comments