xstylev1.0.0
ReferenceRéférence

Suppression and environmentSuppression et environnement

Silence a rule on a line, the next line or a whole file, and set the defaults with environment variables.Faire taire une règle sur une ligne, la ligne suivante ou tout un fichier, et fixer les valeurs par défaut avec des variables d'environnement.

1. In a commentDans un commentaire

CommentSilences
xstyle: ignore [CODE,...]this line
xstyle: ignore-next [CODE,...]the next line
xstyle: ignore-file [CODE,...]the whole file

Without a code, every rule is silenced there; a code can be a prefix or a pattern (CPP, LU-*). A reason after the codes starts with a lower case word or a parenthesis (upper case words would be read as codes).

std::cout << "\033[1m"; // xstyle: ignore LU-ANSI
// xstyle: ignore-next CPP-AUTO
auto lambda = [](int x) {return x * 2;};
// xstyle: ignore-file CPP-GUARD-MISSING (no guard on purpose)
CommentaireFait taire
xstyle: ignore [CODE,...]cette ligne
xstyle: ignore-next [CODE,...]la ligne suivante
xstyle: ignore-file [CODE,...]tout le fichier

Sans code, toutes les règles y sont tues ; un code peut être un préfixe ou un motif (CPP, LU-*). Une raison après les codes commence par un mot en minuscules ou une parenthèse (des mots en majuscules seraient lus comme des codes).

std::cout << "\033[1m"; // xstyle: ignore LU-ANSI
// xstyle: ignore-next CPP-AUTO
auto lambda = [](int x) {return x * 2;};
// xstyle: ignore-file CPP-GUARD-MISSING (no guard on purpose)

2. Environment variablesVariables d'environnement

Each one gives the default of its flag; the flag given on the command line wins.

VariableFlag
XSTYLE_CODES-c, --code
XSTYLE_IGNORE-i, --ignore
XSTYLE_SEVERITY-s, --severity
XSTYLE_MODES-m, --mode
XSTYLE_EXCLUDE-e, --exclude
XSTYLE_LIBUTILS-u, --libutils
XSTYLE_HEADER--header
XSTYLE_REPORT-o, --report
XSTYLE_LINK--link
XSTYLE_RTK=1--rtk
XSTYLE_R34=1--r34
NO_COLOR--no-color
Other variableEffect
XSTYLE_LIBUTILS_SKILLfolder of the libutils skill read by --libutils-check
XSTYLE_HOOK=0the pre-commit hook does nothing
XSTYLE_BINthe binary run by the pre-commit hook

Every flag: the options.

Chacune donne la valeur par défaut de son flag ; le flag donné en ligne de commande l'emporte.

VariableFlag
XSTYLE_CODES-c, --code
XSTYLE_IGNORE-i, --ignore
XSTYLE_SEVERITY-s, --severity
XSTYLE_MODES-m, --mode
XSTYLE_EXCLUDE-e, --exclude
XSTYLE_LIBUTILS-u, --libutils
XSTYLE_HEADER--header
XSTYLE_REPORT-o, --report
XSTYLE_LINK--link
XSTYLE_RTK=1--rtk
XSTYLE_R34=1--r34
NO_COLOR--no-color
Autre variableEffet
XSTYLE_LIBUTILS_SKILLdossier du skill libutils lu par --libutils-check
XSTYLE_HOOK=0le hook pre-commit ne fait rien
XSTYLE_BINle binaire lancé par le hook pre-commit

Tous les flags : les options.