ReferenceRéférence
OptionsOptions
Every flag of xstyle with its environment variable, read from xstyle --help.Tous les flags de xstyle avec leur variable d'environnement, lus depuis xstyle --help.
Generated from xstyle --help of version v1.0.0. Paths are bare arguments (default .); -r scans the directories recursively (always done with no path).
Généré depuis xstyle --help de la version v1.0.0 (descriptions du programme, en anglais). Les chemins sont des arguments nus (par défaut .) ; -r parcourt les dossiers récursivement (toujours fait sans chemin).
1. SelectionSélection
| Flag | Value | Environment | Effect |
|---|---|---|---|
-r, --recursive | - | - | Scan the directories recursively (always done when no path is given) |
-d, --diff | - | - | Only the lines changed since HEAD (staged + not staged changes, new files included) |
--diff-ref | <ref> | - | Only the lines changed since this ref (branch, tag, commit: --diff-ref main) |
--staged | - | - | Only the staged lines (git diff --cached): the pre-commit hook mode |
-c, --code | <codes> | XSTYLE_CODES | Only these rules: codes, prefixes or patterns, comma separated (CPP-NULL,LU,G-*) |
-i, --ignore | <codes> | XSTYLE_IGNORE | Never these rules (same format as --code) |
-s, --severity | <level> | XSTYLE_SEVERITY | Minimal severity reported: unforgivable | major | minor | negligible (default) |
-m, --mode | <levels> | XSTYLE_MODES | Only the issues of these fix levels, comma separated: auto, force, dangerous, ask, manual (--fix included) |
-F, --fail-on | <level> | - | Exit 1 only if an issue of this severity or above is left (default: negligible) |
-e, --exclude | <patterns> | XSTYLE_EXCLUDE | Skip the paths matching these patterns, comma separated (folder name, path prefix or glob: build,third_party,*.gen.hpp) |
-l, --lang | <languages> | - | Only these languages, comma separated (cpp,c,py,sh,rs,lua,js,cmake,make,yaml,json,md) |
-t, --top | - | - | Only the most used language of the files found |
-u, --libutils | <mode> | XSTYLE_LIBUTILS | libutils rules: auto (installed and used by the project, default) | on | off |
--r34 | - | - | I have read the Terms and Conditions of Rule 34, I understand them, I accept them without reading them again, I waive my right to be reminded and I promise not to ask what it means (hides R34, env XSTYLE_R34=1) |
| Flag | Valeur | Environnement | Effet |
|---|---|---|---|
-r, --recursive | - | - | Scan the directories recursively (always done when no path is given) |
-d, --diff | - | - | Only the lines changed since HEAD (staged + not staged changes, new files included) |
--diff-ref | <ref> | - | Only the lines changed since this ref (branch, tag, commit: --diff-ref main) |
--staged | - | - | Only the staged lines (git diff --cached): the pre-commit hook mode |
-c, --code | <codes> | XSTYLE_CODES | Only these rules: codes, prefixes or patterns, comma separated (CPP-NULL,LU,G-*) |
-i, --ignore | <codes> | XSTYLE_IGNORE | Never these rules (same format as --code) |
-s, --severity | <level> | XSTYLE_SEVERITY | Minimal severity reported: unforgivable | major | minor | negligible (default) |
-m, --mode | <levels> | XSTYLE_MODES | Only the issues of these fix levels, comma separated: auto, force, dangerous, ask, manual (--fix included) |
-F, --fail-on | <level> | - | Exit 1 only if an issue of this severity or above is left (default: negligible) |
-e, --exclude | <patterns> | XSTYLE_EXCLUDE | Skip the paths matching these patterns, comma separated (folder name, path prefix or glob: build,third_party,*.gen.hpp) |
-l, --lang | <languages> | - | Only these languages, comma separated (cpp,c,py,sh,rs,lua,js,cmake,make,yaml,json,md) |
-t, --top | - | - | Only the most used language of the files found |
-u, --libutils | <mode> | XSTYLE_LIBUTILS | libutils rules: auto (installed and used by the project, default) | on | off |
--r34 | - | - | I have read the Terms and Conditions of Rule 34, I understand them, I accept them without reading them again, I waive my right to be reminded and I promise not to ask what it means (hides R34, env XSTYLE_R34=1) |
2. FixCorrection
| Flag | Value | Environment | Effect |
|---|---|---|---|
-f, --fix | \[codes\] | - | Fix what can be fixed automatically (only the given codes / prefixes when given) |
-n, --dry-run | - | - | With --fix: show the changes without writing the files |
--force | - | - | With --fix: also the [force-fix] fixes, that can change the behavior (set -euo pipefail, encoding...) |
--dangerous-force | - | - | With --fix: also the [danger-fix] fixes, guessed and possibly wrong (types guessed from the usage, pointer casts...), implies --force |
--header | <banner> | XSTYLE_HEADER | With --fix: banner of the missing file headers: none | default (XARTANIA) | <text> (asked per file when not given) |
--header-desc | <text> | - | With --header: description of the new file headers (default: the default description) |
--commit | - | - | With --fix: commit the fixed files (a file that already had changes is left out) |
--commit-all | - | - | With --fix: commit every tracked change with the fixes |
--message | <text> | - | Message of --commit / --commit-all (default: chore(style): apply the xstyle fixes (...)) |
| Flag | Valeur | Environnement | Effet |
|---|---|---|---|
-f, --fix | \[codes\] | - | Fix what can be fixed automatically (only the given codes / prefixes when given) |
-n, --dry-run | - | - | With --fix: show the changes without writing the files |
--force | - | - | With --fix: also the [force-fix] fixes, that can change the behavior (set -euo pipefail, encoding...) |
--dangerous-force | - | - | With --fix: also the [danger-fix] fixes, guessed and possibly wrong (types guessed from the usage, pointer casts...), implies --force |
--header | <banner> | XSTYLE_HEADER | With --fix: banner of the missing file headers: none | default (XARTANIA) | <text> (asked per file when not given) |
--header-desc | <text> | - | With --header: description of the new file headers (default: the default description) |
--commit | - | - | With --fix: commit the fixed files (a file that already had changes is left out) |
--commit-all | - | - | With --fix: commit every tracked change with the fixes |
--message | <text> | - | Message of --commit / --commit-all (default: chore(style): apply the xstyle fixes (...)) |
3. OutputSortie
| Flag | Value | Environment | Effect |
|---|---|---|---|
--rtk | - | XSTYLE_RTK=1 | Compact output for an AI (token saving): one line per issue, no color / source / table |
-o, --report | <file> | XSTYLE_REPORT | Write the report in this file instead of the terminal (.txt, .md or .json) |
--format | <format> | - | Format of the report file: text | md | json (default: from the extension) |
-S, --summary | - | - | Only the summary (counters by severity and code) in the terminal |
--no-color | - | - | No colors nor hyperlinks (also with NO_COLOR or when not in a terminal) |
--link | <mode> | XSTYLE_LINK | Hyperlinks of the locations: file (file://, default) | vscode (vscode://file/...:line:column) | none |
| Flag | Valeur | Environnement | Effet |
|---|---|---|---|
--rtk | - | XSTYLE_RTK=1 | Compact output for an AI (token saving): one line per issue, no color / source / table |
-o, --report | <file> | XSTYLE_REPORT | Write the report in this file instead of the terminal (.txt, .md or .json) |
--format | <format> | - | Format of the report file: text | md | json (default: from the extension) |
-S, --summary | - | - | Only the summary (counters by severity and code) in the terminal |
--no-color | - | - | No colors nor hyperlinks (also with NO_COLOR or when not in a terminal) |
--link | <mode> | XSTYLE_LINK | Hyperlinks of the locations: file (file://, default) | vscode (vscode://file/...:line:column) | none |
4. InformationInformation
| Flag | Value | Environment | Effect |
|---|---|---|---|
-L, --list-rules | - | - | List every rule (code, severity, fixable, languages) |
-x, --explain | <code> | - | Explain the given rule(s) |
-v, --version | - | - | Version of xstyle |
--libutils-check | - | - | Is the libutils skill reference up to date (installed version, libutils repository)? exit 0 yes, 1 no |
--completion | <shell> | - | Print the completion script of the shell (bash | zsh | fish), installed with the packages of xstyle |
| Flag | Valeur | Environnement | Effet |
|---|---|---|---|
-L, --list-rules | - | - | List every rule (code, severity, fixable, languages) |
-x, --explain | <code> | - | Explain the given rule(s) |
-v, --version | - | - | Version of xstyle |
--libutils-check | - | - | Is the libutils skill reference up to date (installed version, libutils repository)? exit 0 yes, 1 no |
--completion | <shell> | - | Print the completion script of the shell (bash | zsh | fish), installed with the packages of xstyle |
5. Exit statusCode de sortie
| Status | Meaning |
|---|---|
0 | clean |
1 | issues left (at or above --fail-on; the mandatory R34 never counts) |
255 | error |
| Code | Sens |
|---|---|
0 | propre |
1 | problèmes restants (au niveau de --fail-on ou plus ; R34, obligatoire, ne compte jamais) |
255 | erreur |