Sub-commands and Arguments
Overview of sub-commands:
doc
Command to generate the JSON documentation of the currently loaded plugins
lint
Lint a project or a list of files.
yalo doc
Command to generate the JSON documentation of the currently loaded plugins
DESCRIPTION
USAGE
yalo doc [OPTIONS]
Where options are:
-C CONFIG-FILEor--config-file CONFIG-FILELoad CONFIG-FILE instead of searching for .yaloconf-I DIRor--include-dir DIRAdd DIR to the list of directories when plugins should be searched for-L PLUGINor--load-plugin PLUGINLoad plugin PLUGIN (a .cmxs or a .ml file)-P PROFILEor--profile PROFILESpecify a profile to load (a yalo-<PROFILE>.conf file)--dir DIRECTORYTarget directory for output-e SPECor--errors SPECSet errors according to SPEC-ification--no-load-pluginsDo not load plugins--print-configPrint configuration--save-config FILESave configuration to FILE-w SPECor--warnings SPECSet warnings according to SPEC-ification
yalo lint
Lint a project or a list of files.
DESCRIPTION
Thie command will perform the following actions
Early actions (common to all sub-commands):
1. Lookup the .yaloconf file in the containing folders. if located, chdir to the corresponding directory.
2. If a configuration file was found, load the corresponding file. If profiles are specified in the configuration file, recursively load the profiles too.
3. If plugins are specified on command line, in the configuration file or in profiles specified in the configuration file, load the plugins
Specific actions:
a. Enable/disable warnings following command line and configuration options. Enable only linters for enabled warnings.
b. Scan the project tree, looking for files to lint. Each file is associated with a set of including projects.
c. Lint all the files of selected projects
d. Display or output warnings
e. Apply autofix patches if available and the –autofix option was used
INITIAL ARGUMENTS
Some arguments MUST be specified before the sub-command name (-L,-P,-I,-C,–no-load-plugins). The reason is that these arguments are used to define which and how plugins should be loaded, either directly or though configuration files, and plugins can define new arguments for sub-commands and even new sub-commands
USAGE
yalo lint FILES [OPTIONS]
Where options are:
FILESList of files or directories that should be explicitely linted-C CONFIG-FILEor--config-file CONFIG-FILELoad CONFIG-FILE instead of searching for .yaloconf-I DIRor--include-dir DIRAdd DIR to the list of directories when plugins should be searched for-L PLUGINor--load-plugin PLUGINLoad plugin PLUGIN (a .cmxs or a .ml file)-P PROFILEor--profile PROFILESpecify a profile to load (a yalo-<PROFILE>.conf file)--autofixApply all automatic replacements (files created in _yalo/)--autofix-inplaceAutofix files in place-e SPECor--errors SPECSet errors according to SPEC-ification-f FORMATor--message-format FORMATSet message format to FORMAT: context (default), human, short, summary, sarif--no-load-pluginsDo not load plugins--no-summaryNever print any summary-o FILEor--output FILEFile for JSON output-p PROJECTor--package PROJECTLint only files from PROJECT--print-configPrint configuration--save-config FILESave configuration to FILE--skip-config-warningsSkip warnings and errors settings by config file--summary-from NUMBERPrint summary when warnings exceed NUMBER-w SPECor--warnings SPECSet warnings according to SPEC-ification