xstylev1.0.0
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

FlagValueEnvironmentEffect
-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_CODESOnly these rules: codes, prefixes or patterns, comma separated (CPP-NULL,LU,G-*)
-i, --ignore<codes>XSTYLE_IGNORENever these rules (same format as --code)
-s, --severity<level>XSTYLE_SEVERITYMinimal severity reported: unforgivable | major | minor | negligible (default)
-m, --mode<levels>XSTYLE_MODESOnly 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_EXCLUDESkip 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_LIBUTILSlibutils 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)
FlagValeurEnvironnementEffet
-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_CODESOnly these rules: codes, prefixes or patterns, comma separated (CPP-NULL,LU,G-*)
-i, --ignore<codes>XSTYLE_IGNORENever these rules (same format as --code)
-s, --severity<level>XSTYLE_SEVERITYMinimal severity reported: unforgivable | major | minor | negligible (default)
-m, --mode<levels>XSTYLE_MODESOnly 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_EXCLUDESkip 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_LIBUTILSlibutils 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

FlagValueEnvironmentEffect
-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&lt;banner&gt;XSTYLE_HEADERWith --fix: banner of the missing file headers: none | default (XARTANIA) | <text> (asked per file when not given)
--header-desc&lt;text&gt;-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&lt;text&gt;-Message of --commit / --commit-all (default: chore(style): apply the xstyle fixes (...))
FlagValeurEnvironnementEffet
-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&lt;banner&gt;XSTYLE_HEADERWith --fix: banner of the missing file headers: none | default (XARTANIA) | <text> (asked per file when not given)
--header-desc&lt;text&gt;-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&lt;text&gt;-Message of --commit / --commit-all (default: chore(style): apply the xstyle fixes (...))

3. OutputSortie

FlagValueEnvironmentEffect
--rtk-XSTYLE_RTK=1Compact output for an AI (token saving): one line per issue, no color / source / table
-o, --report&lt;file&gt;XSTYLE_REPORTWrite the report in this file instead of the terminal (.txt, .md or .json)
--format&lt;format&gt;-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&lt;mode&gt;XSTYLE_LINKHyperlinks of the locations: file (file://, default) | vscode (vscode://file/...:line:column) | none
FlagValeurEnvironnementEffet
--rtk-XSTYLE_RTK=1Compact output for an AI (token saving): one line per issue, no color / source / table
-o, --report&lt;file&gt;XSTYLE_REPORTWrite the report in this file instead of the terminal (.txt, .md or .json)
--format&lt;format&gt;-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&lt;mode&gt;XSTYLE_LINKHyperlinks of the locations: file (file://, default) | vscode (vscode://file/...:line:column) | none

4. InformationInformation

FlagValueEnvironmentEffect
-L, --list-rules--List every rule (code, severity, fixable, languages)
-x, --explain&lt;code&gt;-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&lt;shell&gt;-Print the completion script of the shell (bash | zsh | fish), installed with the packages of xstyle
FlagValeurEnvironnementEffet
-L, --list-rules--List every rule (code, severity, fixable, languages)
-x, --explain&lt;code&gt;-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&lt;shell&gt;-Print the completion script of the shell (bash | zsh | fish), installed with the packages of xstyle

5. Exit statusCode de sortie

StatusMeaning
0clean
1issues left (at or above --fail-on; the mandatory R34 never counts)
255error
CodeSens
0propre
1problèmes restants (au niveau de --fail-on ou plus ; R34, obligatoire, ne compte jamais)
255erreur