The --help
on a CLI is often one of the first places someone looks for info after their first install.
With a help command you have basically two goals; show the breadth of options and provide info on the set of of useful sub-commands. What seems to be really tricky is that the info in these commands can get very horizontally long and the heirarchy of that information can get a bit muddied.
For a long description, you can safely rely on a terminal wrapping your text, but its unlikely that it's going to work well with any left-edge formatting without considerable work. We see a few different ways to align the tabular form of this kind of data. For these examples, I mock out the width of the terminal at 90 chars, which should be the same width as the code samples below.
It looks like generally a help prompts from compilers avoids using colour too much. I think elm
does quite a good job of both color and personality, which is something I've seen pretty consistently throughout the errors too.
Version 4.3.2
Syntax: tsc [options] [file...]
Examples: tsc hello.ts
tsc --outFile file.js file.ts
tsc @args.txt
tsc --build tsconfig.json
Options:
-h, --help Print this message.
-w, --watch Watch input files.
--pretty Stylize errors and messages using color and context (experimental).
--all Show all compiler options.
-v, --version Print the compiler's version.
--init Initializes a TypeScript project and creates a tsconfig.json file.
-p FILE OR DIRECTORY, --project FILE OR DIRECTORY Compile the project given the path to its configuration file, or to a folder with a 'tsconfig.json'.
-b, --build Build one or more projects and their dependencies, if out of date
-t VERSION, --target VERSION Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', 'ES2021', or 'ESNEXT'.
-m KIND, --module KIND Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'.
--lib Specify library files to be included in the compilation.
'es5' 'es6' 'es2015' 'es7' 'es2016' 'es2017' 'es2018' 'es2019' 'es2020' 'es2021' 'esnext' 'dom' 'dom.iterable' 'webworker' 'webworker.importscripts' 'webworker.iterable' 'scripthost' 'es2015.core' 'es2015.collection' 'es2015.generator' 'es2015.iterable' 'es2015.promise' 'es2015.proxy' 'es2015.reflect' 'es2015.symbol' 'es2015.symbol.wellknown' 'es2016.array.include' 'es2017.object' 'es2017.sharedmemory' 'es2017.string' 'es2017.intl' 'es2017.typedarrays' 'es2018.asyncgenerator' 'es2018.asynciterable' 'es2018.intl' 'es2018.promise' 'es2018.regexp' 'es2019.array' 'es2019.object' 'es2019.string' 'es2019.symbol' 'es2020.bigint' 'es2020.promise' 'es2020.sharedmemory' 'es2020.string' 'es2020.symbol.wellknown' 'es2020.intl' 'es2021.promise' 'es2021.string' 'es2021.weakref' 'esnext.array' 'esnext.symbol' 'esnext.asynciterable' 'esnext.intl' 'esnext.bigint' 'esnext.string' 'esnext.promise' 'esnext.weakref'
--allowJs Allow javascript files to be compiled.
--jsx KIND Specify JSX code generation: 'preserve', 'react-native', 'react', 'react-jsx' or 'react-jsxdev'.
-d, --declaration Generates corresponding '.d.ts' file.
--declarationMap Generates a sourcemap for each corresponding '.d.ts' file.
--sourceMap Generates corresponding '.map' file.
--outFile FILE Concatenate and emit output to single file.
--outDir DIRECTORY Redirect output structure to the directory.
--removeComments Do not emit comments to output.
--noEmit Do not emit outputs.
--strict Enable all strict type-checking options.
--noImplicitAny Raise error on expressions and declarations with an implied 'any' type.
--strictNullChecks Enable strict null checks.
--strictFunctionTypes Enable strict checking of function types.
--strictBindCallApply Enable strict 'bind', 'call', and 'apply' methods on functions.
--strictPropertyInitialization Enable strict checking of property initialization in classes.
--noImplicitThis Raise error on 'this' expressions with an implied 'any' type.
--alwaysStrict Parse in strict mode and emit "use strict" for each source file.
--noUnusedLocals Report errors on unused locals.
--noUnusedParameters Report errors on unused parameters.
--noImplicitReturns Report error when not all code paths in function return a value.
--noFallthroughCasesInSwitch Report errors for fallthrough cases in switch statement.
--types Type declaration files to be included in compilation.
--esModuleInterop Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'.
@<file> Insert command line options and files from a file.
There's a lot of tsconfig flags (and some more which are just for the CLI) so the TypeScript CLI includes a version which lists all possible flags:
Version 4.3.2
Syntax: tsc [options] [file...]
Examples: tsc hello.ts
tsc --outFile file.js file.ts
tsc @args.txt
tsc --build tsconfig.json
Options:
--all Show all compiler options.
--allowJs Allow javascript files to be compiled.
--allowSyntheticDefaultImports Allow default imports from modules with no default export. This does not affect code emit, just typechecking.
--allowUmdGlobalAccess Allow accessing UMD globals from modules.
--allowUnreachableCode Do not report errors on unreachable code.
--allowUnusedLabels Do not report errors on unused labels.
--alwaysStrict Parse in strict mode and emit "use strict" for each source file.
--assumeChangesOnlyAffectDirectDependencies Have recompiles in '--incremental' and '--watch' assume that changes within a file will only affect files directly depending on it.
--baseUrl Base directory to resolve non-absolute module names.
-b, --build Build one or more projects and their dependencies, if out of date
--charset The character set of the input files.
--checkJs Report errors in .js files.
--composite Enable project compilation
-d, --declaration Generates corresponding '.d.ts' file.
--declarationDir DIRECTORY Output directory for generated declaration files.
--declarationMap Generates a sourcemap for each corresponding '.d.ts' file.
--diagnostics Show diagnostic information.
--disableReferencedProjectLoad Disable loading referenced projects.
--disableSizeLimit Disable size limitations on JavaScript projects.
--disableSolutionSearching Disable solution searching for this project.
--disableSourceOfProjectReferenceRedirect Disable use of source files instead of declaration files from referenced projects.
--downlevelIteration Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'.
--emitBOM Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files.
--emitDeclarationOnly Only emit '.d.ts' declaration files.
--emitDecoratorMetadata Enables experimental support for emitting type metadata for decorators.
--esModuleInterop Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'.
--experimentalDecorators Enables experimental support for ES7 decorators.
--explainFiles Print names of files and the reason they are part of the compilation.
--extendedDiagnostics Show verbose diagnostic information.
--forceConsistentCasingInFileNames Disallow inconsistently-cased references to the same file.
--generateCpuProfile FILE OR DIRECTORY Generates a CPU profile.
--generateTrace DIRECTORY Generates an event trace and a list of types.
-h, --help Print this message.
--importHelpers Import emit helpers from 'tslib'.
--importsNotUsedAsValues Specify emit/checking behavior for imports that are only used for types
-i, --incremental Enable incremental compilation
--init Initializes a TypeScript project and creates a tsconfig.json file.
--inlineSourceMap Emit a single file with source maps instead of having a separate file.
--inlineSources Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set.
--isolatedModules Transpile each file as a separate module (similar to 'ts.transpileModule').
--jsx KIND Specify JSX code generation: 'preserve', 'react-native', 'react', 'react-jsx' or 'react-jsxdev'.
--jsxFactory Specify the JSX factory function to use when targeting 'react' JSX emit, e.g. 'React.createElement' or 'h'.
--jsxFragmentFactory Specify the JSX fragment factory function to use when targeting 'react' JSX emit with 'jsxFactory' compiler option is specified, e.g. 'Fragment'.
--jsxImportSource Specify the module specifier to be used to import the 'jsx' and 'jsxs' factory functions from. eg, react
--keyofStringsOnly Resolve 'keyof' to string valued property names only (no numbers or symbols).
--lib Specify library files to be included in the compilation.
'es5' 'es6' 'es2015' 'es7' 'es2016' 'es2017' 'es2018' 'es2019' 'es2020' 'es2021' 'esnext' 'dom' 'dom.iterable' 'webworker' 'webworker.importscripts' 'webworker.iterable' 'scripthost' 'es2015.core' 'es2015.collection' 'es2015.generator' 'es2015.iterable' 'es2015.promise' 'es2015.proxy' 'es2015.reflect' 'es2015.symbol' 'es2015.symbol.wellknown' 'es2016.array.include' 'es2017.object' 'es2017.sharedmemory' 'es2017.string' 'es2017.intl' 'es2017.typedarrays' 'es2018.asyncgenerator' 'es2018.asynciterable' 'es2018.intl' 'es2018.promise' 'es2018.regexp' 'es2019.array' 'es2019.object' 'es2019.string' 'es2019.symbol' 'es2020.bigint' 'es2020.promise' 'es2020.sharedmemory' 'es2020.string' 'es2020.symbol.wellknown' 'es2020.intl' 'es2021.promise' 'es2021.string' 'es2021.weakref' 'esnext.array' 'esnext.symbol' 'esnext.asynciterable' 'esnext.intl' 'esnext.bigint' 'esnext.string' 'esnext.promise' 'esnext.weakref'
--listEmittedFiles Print names of generated files part of the compilation.
--listFiles Print names of files part of the compilation.
--listFilesOnly Print names of files that are part of the compilation and then stop processing.
--locale The locale used when displaying messages to the user (e.g. 'en-us')
--mapRoot LOCATION Specify the location where debugger should locate map files instead of generated locations.
--maxNodeModuleJsDepth The maximum dependency depth to search under node_modules and load JavaScript files.
-m KIND, --module KIND Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'.
--moduleResolution STRATEGY Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6).
--newLine NEWLINE Specify the end of line sequence to be used when emitting files: 'CRLF' (dos) or 'LF' (unix).
--noEmit Do not emit outputs.
--noEmitHelpers Do not generate custom helper functions like '__extends' in compiled output.
--noEmitOnError Do not emit outputs if any errors were reported.
--noErrorTruncation Do not truncate error messages.
--noFallthroughCasesInSwitch Report errors for fallthrough cases in switch statement.
--noImplicitAny Raise error on expressions and declarations with an implied 'any' type.
--noImplicitOverride Ensure overriding members in derived classes are marked with an 'override' modifier.
--noImplicitReturns Report error when not all code paths in function return a value.
--noImplicitThis Raise error on 'this' expressions with an implied 'any' type.
--noImplicitUseStrict Do not emit 'use strict' directives in module output.
--noLib Do not include the default library file (lib.d.ts).
--noPropertyAccessFromIndexSignature Require undeclared properties from index signatures to use element accesses.
--noResolve Do not add triple-slash references or imported modules to the list of compiled files.
--noStrictGenericChecks Disable strict checking of generic signatures in function types.
--noUncheckedIndexedAccess Include 'undefined' in index signature results
--noUnusedLocals Report errors on unused locals.
--noUnusedParameters Report errors on unused parameters.
--out FILE [Deprecated] Use '--outFile' instead. Concatenate and emit output to single file
--outDir DIRECTORY Redirect output structure to the directory.
--outFile FILE Concatenate and emit output to single file.
--paths A series of entries which re-map imports to lookup locations relative to the 'baseUrl'.
--plugins List of language service plugins.
--preserveConstEnums Do not erase const enum declarations in generated code.
--preserveSymlinks Do not resolve the real path of symlinks.
--preserveWatchOutput Whether to keep outdated console output in watch mode instead of clearing the screen.
--pretty Stylize errors and messages using color and context (experimental).
-p FILE OR DIRECTORY, --project FILE OR DIRECTORY Compile the project given the path to its configuration file, or to a folder with a 'tsconfig.json'.
--reactNamespace [Deprecated] Use '--jsxFactory' instead. Specify the object invoked for createElement when targeting 'react' JSX emit
--removeComments Do not emit comments to output.
--resolveJsonModule Include modules imported with '.json' extension
--rootDir LOCATION Specify the root directory of input files. Use to control the output directory structure with --outDir.
--rootDirs List of root folders whose combined content represents the structure of the project at runtime.
--showConfig Print the final configuration instead of building.
--skipDefaultLibCheck [Deprecated] Use '--skipLibCheck' instead. Skip type checking of default library declaration files.
--skipLibCheck Skip type checking of declaration files.
--sourceMap Generates corresponding '.map' file.
--sourceRoot LOCATION Specify the location where debugger should locate TypeScript files instead of source locations.
--strict Enable all strict type-checking options.
--strictBindCallApply Enable strict 'bind', 'call', and 'apply' methods on functions.
--strictFunctionTypes Enable strict checking of function types.
--strictNullChecks Enable strict null checks.
--strictPropertyInitialization Enable strict checking of property initialization in classes.
--stripInternal Do not emit declarations for code that has an '@internal' annotation.
--suppressExcessPropertyErrors Suppress excess property checks for object literals.
--suppressImplicitAnyIndexErrors Suppress noImplicitAny errors for indexing objects lacking index signatures.
-t VERSION, --target VERSION Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', 'ES2021', or 'ESNEXT'.
--traceResolution Enable tracing of the name resolution process.
--tsBuildInfoFile FILE Specify file to store incremental compilation information
--typeRoots List of folders to include type definitions from.
--types Type declaration files to be included in compilation.
--useDefineForClassFields Emit class fields with Define instead of Set.
-v, --version Print the compiler's version.
-w, --watch Watch input files.
@<file> Insert command line options and files from a file.
Usage: elixir [options] [.exs file] [data]
## General options
-e "COMMAND" Evaluates the given command (*)
-h, --help Prints this message and exits
-r "FILE" Requires the given files/patterns (*)
-S SCRIPT Finds and executes the given script in $PATH
-pr "FILE" Requires the given files/patterns in parallel (*)
-pa "PATH" Prepends the given path to Erlang code path (*)
-pz "PATH" Appends the given path to Erlang code path (*)
-v, --version Prints Elixir version and exits
--app APP Starts the given app and its dependencies (*)
--erl "SWITCHES" Switches to be passed down to Erlang (*)
--eval "COMMAND" Evaluates the given command, same as -e (*)
--logger-otp-reports BOOL Enables or disables OTP reporting
--logger-sasl-reports BOOL Enables or disables SASL reporting
--no-halt Does not halt the Erlang VM after execution
--werl Uses Erlang's Windows shell GUI (Windows only)
Options given after the .exs file or -- are passed down to the executed code.
Options can be passed to the Erlang runtime using $ELIXIR_ERL_OPTIONS or --erl.
## Distribution options
The following options are related to node distribution.
--cookie COOKIE Sets a cookie for this distributed node
--hidden Makes a hidden node
--name NAME Makes and assigns a name to the distributed node
--rpc-eval NODE "COMMAND" Evaluates the given command on the given remote node (*)
--sname NAME Makes and assigns a short name to the distributed node
## Release options
The following options are generally used under releases.
--boot "FILE" Uses the given FILE.boot to start the system
--boot-var VAR "VALUE" Makes $VAR available as VALUE to FILE.boot (*)
--erl-config "FILE" Loads configuration in FILE.config written in Erlang (*)
--pipe-to "PIPEDIR" "LOGDIR" Starts the Erlang VM as a named PIPEDIR and LOGDIR
--vm-args "FILE" Passes the contents in file as arguments to the VM
--pipe-to starts Elixir detached from console (Unix-like only).
It will attempt to create PIPEDIR and LOGDIR if they don't exist.
See run_erl to learn more. To reattach, run: to_erl PIPEDIR.
** Options marked with (*) can be given more than once.
Cool use of color (all the commands are blue, the 'read more' banner at the top is greyed out somewhat) and a pretty strong hierarchy of information.
Hi, thank you for trying out Elm 0.19.1. I hope you like it!
-------------------------------------------------------------------------------
I highly recommend working through <https://guide.elm-lang.org> to get started.
It teaches many important concepts, including how to use `elm` in the terminal.
-------------------------------------------------------------------------------
The most common commands are:
elm repl
Open up an interactive programming session. Type in Elm expressions like
(2 + 2) or (String.length "test") and see if they equal four!
elm init
Start an Elm project. It creates a starter elm.json file and provides a
link explaining what to do from there.
elm reactor
Compile code with a click. It opens a file viewer in your browser, and
when you click on an Elm file, it compiles and you see the result.
There are a bunch of other commands as well though. Here is a full list:
elm repl --help
elm init --help
elm reactor --help
elm make --help
elm install --help
elm bump --help
elm diff --help
elm publish --help
Adding the --help flag gives a bunch of additional details about each one.
Be sure to ask on the Elm slack if you run into trouble! Folks are friendly and
happy to help out. They hang out there because it is fun, so be kind to get the
best results!
Given that most of the work happens in a sub-commands, here's elm make --help
:
The `make` command compiles Elm code into JS or HTML:
elm make <zero-or-more-elm-files>
For example:
elm make src/Main.elm
This tries to compile an Elm file named src/Main.elm, generating an index.html
file if possible.
You can customize this command with the following flags:
--debug
Turn on the time-travelling debugger. It allows you to rewind and replay
events. The events can be imported/exported into a file, which makes for
very precise bug reports!
--optimize
Turn on optimizations to make code smaller and faster. For example, the
compiler renames record fields to be as short as possible and unboxes
values to reduce allocation.
--output=<output-file>
Specify the name of the resulting JS file. For example
--output=assets/elm.js to generate the JS at assets/elm.js or
--output=/dev/null to generate no output at all!
--report=<report-type>
You can say --report=json to get error messages as JSON. This is only
really useful if you are an editor plugin. Humans should avoid it!
--docs=<json-file>
Generate a JSON file of documentation for a package. Eventually it will
be possible to preview docs with `reactor` because it is quite hard to
deal with these JSON files directly.
Usage: rustc [OPTIONS] INPUT
Options:
-h, --help Display this message
--cfg SPEC Configure the compilation environment
-L [KIND=]PATH Add a directory to the library search path. The
optional KIND can be one of dependency, crate, native,
framework, or all (the default).
-l [KIND=]NAME Link the generated crate(s) to the specified native
library NAME. The optional KIND can be one of
static, framework, or dylib (the default).
--crate-type [bin|lib|rlib|dylib|cdylib|staticlib|proc-macro]
Comma separated list of types of crates
for the compiler to emit
--crate-name NAME
Specify the name of the crate being built
--edition 2015|2018
Specify which edition of the compiler to use when
compiling code.
--emit [asm|llvm-bc|llvm-ir|obj|metadata|link|dep-info|mir]
Comma separated list of types of output for the
compiler to emit
--print [crate-name|file-names|sysroot|target-libdir|cfg|target-list|target-cpus|target-features|relocation-models|code-models|tls-models|target-spec-json|native-static-libs]
Compiler information to print on stdout
-g Equivalent to -C debuginfo=2
-O Equivalent to -C opt-level=2
-o FILENAME Write output to <filename>
--out-dir DIR Write output to compiler-chosen filename in <dir>
--explain OPT Provide a detailed explanation of an error message
--test Build a test harness
--target TARGET Target triple for which the code is compiled
-W, --warn OPT Set lint warnings
-A, --allow OPT Set lint allowed
-D, --deny OPT Set lint denied
-F, --forbid OPT Set lint forbidden
--cap-lints LEVEL
Set the most restrictive lint level. More restrictive
lints are capped at this level
-C, --codegen OPT[=VALUE]
Set a codegen option
-V, --version Print version info and exit
-v, --verbose Use verbose output
Additional help:
-C help Print codegen options
-W help Print 'lint' options and default settings
--help -v Print the full set of options rustc accepts
I found Rust's help a little confusing at first, because I though there was a sense of hierarchy in how the options were presented. E.g. -l
has a series of related flags like --crate-type
because visually it tabs across. This isn't true, there is just a consistent whitespace for single char aliases.
-l [KIND=]NAME Link the generated crate(s) to the specified native
library NAME. The optional KIND can be one of
static, framework, or dylib (the default).
--crate-type [bin|lib|rlib|dylib|cdylib|staticlib|proc-macro]
Comma separated list of types of crates
for the compiler to emit
Rust has additional options for codegen options:
Available codegen options:
-C ar=val -- this option is deprecated and does nothing
-C code-model=val -- choose the code model to use (`rustc --print code-models` for details)
-C codegen-units=val -- divide crate into N units to optimize in parallel
-C debug-assertions=val -- explicitly enable the `cfg(debug_assertions)` directive
-C debuginfo=val -- debug info emission level (0 = no debug info, 1 = line tables only, 2 = full debug info with variable and type information; default: 0)
-C default-linker-libraries=val -- allow the linker to link its default libraries (default: no)
-C embed-bitcode=val -- emit bitcode in rlibs (default: yes)
-C extra-filename=val -- extra data to put in each output filename
-C force-frame-pointers=val -- force use of the frame pointers
-C force-unwind-tables=val -- force use of unwind tables
-C incremental=val -- enable incremental compilation
-C inline-threshold=val -- set the threshold for inlining a function
-C link-arg=val -- a single extra argument to append to the linker invocation (can be used several times)
-C link-args=val -- extra arguments to append to the linker invocation (space separated)
-C link-dead-code=val -- keep dead code at link time (useful for code coverage) (default: no)
-C linker=val -- system linker to link outputs with
-C linker-flavor=val -- linker flavor
-C linker-plugin-lto=val -- generate build artifacts that are compatible with linker-based LTO
-C llvm-args=val -- a list of arguments to pass to LLVM (space separated)
-C lto=val -- perform LLVM link-time optimizations
-C metadata=val -- metadata to mangle symbol names with
-C no-prepopulate-passes=val -- give an empty list of passes to the pass manager
-C no-redzone=val -- disable the use of the redzone
-C no-stack-check=val -- this option is deprecated and does nothing
-C no-vectorize-loops=val -- disable loop vectorization optimization passes
-C no-vectorize-slp=val -- disable LLVM's SLP vectorization pass
-C opt-level=val -- optimization level (0-3, s, or z; default: 0)
-C overflow-checks=val -- use overflow checks for integer arithmetic
-C panic=val -- panic strategy to compile crate with
-C passes=val -- a list of extra LLVM passes to run (space separated)
-C prefer-dynamic=val -- prefer dynamic linking to static linking (default: no)
-C profile-generate=val -- compile the program with profiling instrumentation
-C profile-use=val -- use the given `.profdata` file for profile-guided optimization
-C relocation-model=val -- control generation of position-independent code (PIC) (`rustc --print relocation-models` for details)
-C remark=val -- print remarks for these optimization passes (space separated, or "all")
-C rpath=val -- set rpath values in libs/exes (default: no)
-C save-temps=val -- save all temporary output files during compilation (default: no)
-C soft-float=val -- use soft float ABI (*eabihf targets only) (default: no)
-C target-cpu=val -- select target processor (`rustc --print target-cpus` for details)
-C target-feature=val -- target specific attributes. (`rustc --print target-features` for details). This feature is unsafe.
As well as for linter options:
Available lint options:
-W <foo> Warn about <foo>
-A <foo> Allow <foo>
-D <foo> Deny <foo>
-F <foo> Forbid <foo> (deny <foo> and all attempts to override)
Lint checks provided by rustc:
name default meaning
---- ------- -------
absolute-paths-not-starting-with-crate allow fully qualified paths that start with a module name instead of `crate`, `self`, or an extern crate name
anonymous-parameters allow detects anonymous parameters
box-pointers allow use of owned (Box type) heap memory
clashing-extern-declarations allow detects when an extern fn has been declared with the same name but different types
deprecated-in-future allow detects use of items that will be deprecated in a future version
elided-lifetimes-in-paths allow hidden lifetime parameters in types are deprecated
explicit-outlives-requirements allow outlives requirements can be inferred
indirect-structural-match allow pattern with const indirectly referencing non-structural-match type
keyword-idents allow detects edition keywords being used as an identifier
macro-use-extern-crate allow the `#[macro_use]` attribute is now deprecated in favor of using macros via the module system
meta-variable-misuse allow possible meta-variable misuse at macro definition
missing-copy-implementations allow detects potentially-forgotten implementations of `Copy`
missing-crate-level-docs allow detects crates with no crate-level documentation
missing-debug-implementations allow detects missing implementations of Debug
missing-docs allow detects missing documentation for public members
missing-doc-code-examples allow detects publicly-exported items without code samples in their documentation
non-ascii-idents allow detects non-ASCII identifiers
private-doc-tests allow detects code samples in docs of private items not documented by rustdoc
single-use-lifetimes allow detects lifetime parameters that are only used once
trivial-casts allow detects trivial casts which could be removed
trivial-numeric-casts allow detects trivial casts of numeric types which could be removed
unaligned-references allow detects unaligned references to fields of packed structs
unreachable-pub allow `pub` items not reachable from crate root
unsafe-code allow usage of `unsafe` code
unsafe-op-in-unsafe-fn allow unsafe operations in unsafe functions without an explicit unsafe block are deprecated
unstable-features allow enabling unstable features (deprecated. do not use)
unused-crate-dependencies allow crate dependencies that are never used
unused-extern-crates allow extern crates that are never used
unused-import-braces allow unnecessary braces around an imported item
unused-lifetimes allow detects lifetime parameters that are never used
unused-qualifications allow detects unnecessarily qualified names
unused-results allow unused result of an expression in a statement
variant-size-differences allow detects enums with widely varying variant sizes
array-into-iter warn detects calling `into_iter` on arrays
asm-sub-register warn using only a subset of a register for inline asm inputs
bare-trait-objects warn suggest using `dyn Trait` for trait objects
bindings-with-variant-name warn detects pattern bindings with the same name as one of the matched variants
cenum-impl-drop-cast warn a C-like enum implementing Drop is cast
coherence-leak-check warn distinct impls distinguished only by the leak-check code
confusable-idents warn detects visually confusable pairs between identifiers
dead-code warn detect unused, unexported items
deprecated warn detects use of deprecated items
ellipsis-inclusive-range-patterns warn `...` range patterns are deprecated
exported-private-dependencies warn public interface leaks type from a private dependency
illegal-floating-point-literal-pattern warn floating-point literals cannot be used in patterns
improper-ctypes warn proper use of libc types in foreign modules
improper-ctypes-definitions warn proper use of libc types in foreign item definitions
incomplete-features warn incomplete features that may function improperly in some or all cases
inline-no-sanitize warn detects incompatible use of `#[inline(always)]` and `#[no_sanitize(...)]`
intra-doc-link-resolution-failure warn failures in resolving intra-doc link targets
invalid-codeblock-attributes warn codeblock attribute looks a lot like a known one
invalid-value warn an invalid value is being created (such as a NULL reference)
irrefutable-let-patterns warn detects irrefutable patterns in if-let and while-let statements
late-bound-lifetime-arguments warn detects generic lifetime arguments in path segments with late bound lifetime parameters
mixed-script-confusables warn detects Unicode scripts whose mixed script confusables codepoints are solely used
mutable-borrow-reservation-conflict warn reservation of a two-phased borrow conflicts with other shared borrows
non-camel-case-types warn types, variants, traits and type parameters should have camel case names
non-shorthand-field-patterns warn using `Struct { x: x }` instead of `Struct { x }` in a pattern
non-snake-case warn variables, methods, functions, lifetime parameters and modules should have snake case names
non-upper-case-globals warn static constants should have uppercase identifiers
no-mangle-generic-items warn generic items must be mangled
overlapping-patterns warn detects overlapping patterns
path-statements warn path statements with no effect
private-in-public warn detect private items in public interfaces not caught by the old implementation
proc-macro-derive-resolution-fallback warn detects proc macro derives using inaccessible names from parent modules
redundant-semicolons warn detects unnecessary trailing semicolons
renamed-and-removed-lints warn lints that have been renamed or removed
safe-packed-borrows warn safe borrows of fields of packed structs were erroneously allowed
stable-features warn stable features found in `#[feature]` directive
trivial-bounds warn these bounds don't depend on an type parameters
type-alias-bounds warn bounds in type aliases are not enforced
tyvar-behind-raw-pointer warn raw pointer to an inference variable
uncommon-codepoints warn detects uncommon Unicode codepoints in identifiers
unconditional-recursion warn functions that cannot return without calling themselves
unknown-lints warn unrecognized lint attribute
unnameable-test-items warn detects an item that cannot be named being marked as `#[test_case]`
unreachable-code warn detects unreachable code paths
unreachable-patterns warn detects unreachable patterns
unstable-name-collisions warn detects name collision with an existing but unstable method
unused-allocation warn detects unnecessary allocations that can be eliminated
unused-assignments warn detect assignments that will never be read
unused-attributes warn detects attributes that were not used by the compiler
unused-braces warn unnecessary braces around an expression
unused-comparisons warn comparisons made useless by limits of the types involved
unused-doc-comments warn detects doc comments that aren't used by rustdoc
unused-features warn unused features found in crate-level `#[feature]` directives
unused-imports warn imports that are never used
unused-labels warn detects labels that are never used
unused-macros warn detects macros that were not used
unused-must-use warn unused result of a type flagged as `#[must_use]`
unused-mut warn detect mut variables which don't need to be mutable
unused-parens warn `if`, `match`, `while` and `return` do not need parentheses
unused-unsafe warn unnecessary use of an `unsafe` block
unused-variables warn detect variables which are not used in any way
warnings warn mass-change the level for lints which produce warnings
where-clauses-object-safety warn checks the object safety of where clauses
while-true warn suggest using `loop { }` instead of `while true { }`
ambiguous-associated-items deny ambiguous associated items
arithmetic-overflow deny arithmetic operation overflows
conflicting-repr-hints deny conflicts between `#[repr(..)]` hints that were previously accepted and used in practice
const-err deny constant evaluation detected erroneous expression
ill-formed-attribute-input deny ill-formed attribute inputs that were previously accepted and used in practice
incomplete-include deny trailing content in included file
invalid-type-param-default deny type parameter default erroneously allowed in invalid location
macro-expanded-macro-exports-accessed-by-absolute-paths deny macro-expanded `macro_export` macros from the current crate cannot be referred to by absolute paths
missing-fragment-specifier deny detects missing fragment specifiers in unused `macro_rules!` patterns
mutable-transmutes deny mutating transmuted &mut T from &T may cause undefined behavior
no-mangle-const-items deny const items will not have their symbols exported
order-dependent-trait-objects deny trait-object types were treated as different depending on marker-trait order
overflowing-literals deny literal out of range for its type
patterns-in-fns-without-body deny patterns in functions without body were erroneously allowed
pub-use-of-private-extern-crate deny detect public re-exports of private extern crates
soft-unstable deny a feature gate that doesn't break dependent crates
unconditional-panic deny operation will cause a panic at runtime
unknown-crate-types deny unknown crate type found in `#[crate_type]` directive
Lint groups provided by rustc:
name sub-lints
---- ---------
warnings all lints that are set to issue warnings
future-incompatible keyword-idents, anonymous-parameters, illegal-floating-point-literal-pattern, private-in-public, pub-use-of-private-extern-crate, invalid-type-param-default, safe-packed-borrows, patterns-in-fns-without-body, missing-fragment-specifier, late-bound-lifetime-arguments, order-dependent-trait-objects, coherence-leak-check, tyvar-behind-raw-pointer, absolute-paths-not-starting-with-crate, unstable-name-collisions, where-clauses-object-safety, proc-macro-derive-resolution-fallback, macro-expanded-macro-exports-accessed-by-absolute-paths, ill-formed-attribute-input, conflicting-repr-hints, ambiguous-associated-items, mutable-borrow-reservation-conflict, indirect-structural-match, soft-unstable, cenum-impl-drop-cast, array-into-iter
nonstandard-style non-camel-case-types, non-snake-case, non-upper-case-globals
rust-2018-compatibility keyword-idents, anonymous-parameters, tyvar-behind-raw-pointer, absolute-paths-not-starting-with-crate
rust-2018-idioms bare-trait-objects, unused-extern-crates, ellipsis-inclusive-range-patterns, elided-lifetimes-in-paths, explicit-outlives-requirements
rustdoc intra-doc-link-resolution-failure, invalid-codeblock-attributes, missing-doc-code-examples, private-doc-tests
unused unused-imports, unused-variables, unused-assignments, dead-code, unused-mut, unreachable-code, unreachable-patterns, overlapping-patterns, unused-must-use, unused-unsafe, path-statements, unused-attributes, unused-macros, unused-allocation, unused-doc-comments, unused-extern-crates, unused-features, unused-labels, unused-parens, unused-braces, redundant-semicolons
Compiler plugins can provide additional lints and lint groups. To see a listing of these, re-run `rustc -W help` with a crate filename.
Usage : bsb.exe <bsb-options> -- <ninja_options>
For ninja options, try bsb.exe -- -h.
Note they are supposed to be internals and not reliable.
ninja will be loaded either by just running `bsb.exe' or `bsb.exe .. -- ..`
It is always recommended to run ninja via bsb.exe
Options:
-v Print version and exit
-version Print version and exit
-verbose Set the output(from bsb) to be verbose
-w Watch mode
-clean-world Clean all bs dependencies
-clean Clean only current project
-make-world Build all dependencies and itself
-install Install public interface files into lib/ocaml
-init Init sample project to get started.
Note (`bsb -init sample` will create a sample project while
`bsb -init .` will reuse current directory)
-theme The theme for project initialization.
default is basic:
https://github.com/rescript-lang/rescript-compiler/tree/master/jscomp/bsb/templates
-themes List all available themes
-where Show where bsb.exe is located
-ws [host:]port
specify a websocket number (and optionally, a host).
When a build finishes, we send a message to that port.
For tools that listen on build completion.
OVERVIEW: Swift compiler
USAGE: swiftc
MODES:
-dump-ast Parse and type-check input file(s) and dump AST(s)
-dump-parse Parse input file(s) and dump AST(s)
-dump-pcm Dump debugging information about a precompiled Clang module
-dump-scope-maps <expanded-or-list-of-line:column>
Parse and type-check input file(s) and dump the scope map(s)
-dump-type-info Output YAML dump of fixed-size types from all imported modules
-dump-type-refinement-contexts
Type-check input file(s) and dump type refinement contexts(s)
-emit-assembly Emit assembly file(s) (-S)
-emit-bc Emit LLVM BC file(s)
-emit-executable Emit a linked executable
-emit-imported-modules Emit a list of the imported modules
-emit-ir Emit LLVM IR file(s)
-emit-library Emit a linked library
-emit-object Emit object file(s) (-c)
-emit-pcm Emit a precompiled Clang module from a module map
-emit-sibgen Emit serialized AST + raw SIL file(s)
-emit-sib Emit serialized AST + canonical SIL file(s)
-emit-silgen Emit raw SIL file(s)
-emit-sil Emit canonical SIL file(s)
-emit-supported-features
Emit a JSON file including all supported compiler features
-index-file Produce index data for a source file
-parse Parse input file(s)
-print-ast Parse and type-check input file(s) and pretty print AST(s)
-resolve-imports Parse and resolve imports in input file(s)
-scan-clang-dependencies
Scan dependencies of the given Clang module
-scan-dependencies Scan dependencies of the given Swift sources
-typecheck Parse and type-check input file(s)
OPTIONS:
-api-diff-data-dir <path>
Load platform and version specific API migration data files from <path>. Ignored if -api-diff-data-file is specified.
-api-diff-data-file <path>
API migration data is from <path>
-application-extension Restrict code to those available for App Extensions
-assert-config <value> Specify the assert_configuration replacement. Possible values are Debug, Release, Unchecked, DisableReplacement.
-avoid-emit-module-source-info
don't emit Swift source info file
-color-diagnostics Print diagnostics in color
-continue-building-after-errors
Continue building, even after errors are encountered
-coverage-prefix-map <prefix=replacement>
Remap source paths in coverage info
-debug-info-format=<value>
Specify the debug info format type to either 'dwarf' or 'codeview'
-debug-info-store-invocation
Emit the compiler invocation in the debug info.
-debug-prefix-map <prefix=replacement>
Remap source paths in debug info
-define-availability <macro>
Define an availability macro in the format 'macroName : iOS 13.0, macOS 10.15'
-diagnostic-style <style>
The formatting style used when printing diagnostics ('swift' or 'llvm')
-disable-autolinking-runtime-compatibility-dynamic-replacements
Do not use autolinking for the dynamic replacement runtime compatibility library
-disable-autolinking-runtime-compatibility
Do not use autolinking for runtime compatibility libraries
-disable-fuzzy-forward-scan-trailing-closure-matching
Disable fuzzy forward-scan trailing closure matching
-disable-migrator-fixits
Disable the Migrator phase which automatically applies fix-its
-disable-only-one-dependency-file
Disables incremental build optimization that only produces one dependencies file
-disable-request-based-incremental-dependencies
Disable request-based name tracking
-disallow-use-new-driver
Disable using new swift-driver
-driver-compare-incremental-schemes-path <path>
Path to use for machine-readable comparison
-driver-compare-incremental-schemes
Print a simple message comparing dependencies with source ranges (w/ fallback)
-driver-time-compilation
Prints the total time it took to execute all compilation tasks
-dump-migration-states-dir <path>
Dump the input text, output text, and states for migration to <path>
-dump-usr Dump USR for each declaration reference
-D <value> Marks a conditional compilation flag as true
-embed-bitcode-marker Embed placeholder LLVM IR data as a marker
-embed-bitcode Embed LLVM IR bitcode as data
-embed-tbd-for-module <value>
Embed symbols from the module in the emitted tbd file
-emit-dependencies Emit basic Make-compatible dependencies files
-emit-loaded-module-trace-path <path>
Emit the loaded module trace JSON to <path>
-emit-loaded-module-trace
Emit a JSON file containing information about what modules were loaded
-emit-module-interface-path <path>
Output module interface file to <path>
-emit-module-interface Output module interface file
-emit-module-path <path>
Emit an importable module to <path>
-emit-module-source-info-path <path>
Output module source info file to <path>
-emit-module-summary-path <path>
Output module summary file to <path>
-emit-module-summary Output module summary file
-emit-module Emit an importable module
-emit-objc-header-path <path>
Emit an Objective-C header file to <path>
-emit-objc-header Emit an Objective-C header file
-emit-tbd-path <path> Emit the TBD file to <path>
-emit-tbd Emit a TBD file
-enable-experimental-additive-arithmetic-derivation
Enable experimental 'AdditiveArithmetic' derived conformances
-enable-experimental-concise-pound-file
Enable experimental concise '#file' identifier
-enable-experimental-cross-module-incremental-build
(experimental) Enable cross-module incremental build metadata and driver scheduling
-enable-experimental-cxx-interop
Allow importing C++ modules into Swift (experimental feature)
-enable-experimental-forward-mode-differentiation
Enable experimental forward mode differentiation
-enable-fuzzy-forward-scan-trailing-closure-matching
Enable fuzzy forward-scan trailing closure matching
-enable-library-evolution
Build the module to allow binary-compatible library evolution
-enable-only-one-dependency-file
Enables incremental build optimization that only produces one dependencies file
-enable-request-based-incremental-dependencies
Enable request-based name tracking
-enable-source-range-dependencies
Try using source range information
-enforce-exclusivity=<enforcement>
Enforce law of exclusivity
-experimental-cxx-stdlib <value>
C++ standard library to use; forwarded to Clang's -stdlib flag
-fixit-all Apply all fixits from diagnostics without any filtering
-framework <value> Specifies a framework which should be linked against
-Fsystem <value> Add directory to system framework search path
-F <value> Add directory to framework search path
-gdwarf-types Emit full DWARF type info.
-gline-tables-only Emit minimal debug info for backtraces only
-gnone Don't emit debug info
-g Emit debug info. This is the preferred setting for debugging with LLDB.
-help Display available options
-import-underlying-module
Implicitly imports the Objective-C half of a module
-index-file-path <path> Produce index data for file <path>
-index-ignore-system-modules
Avoid indexing system modules
-index-store-path <path>
Store indexing data to <path>
-I <value> Add directory to the import search path
-j <n> Number of commands to execute in parallel
-libc <value> libc runtime library to use
-locale <locale-code> Choose a language for diagnostic messages
-localization-path <path>
Path to localized diagnostic messages directory
-lto=<value> Specify the LTO type to either 'llvm-thin' or 'llvm-full'
-L <value> Add directory to library link search path
-l<value> Specifies a library which should be linked against
-migrate-keep-objc-visibility
When migrating, add '@objc' to declarations that would've been implicitly visible in Swift 3
-migrator-update-sdk Does nothing. Temporary compatibility flag for Xcode.
-migrator-update-swift Does nothing. Temporary compatibility flag for Xcode.
-module-cache-path <value>
Specifies the Clang module cache path
-module-link-name <value>
Library to link against when using this module
-module-name <value> Name of the module to build
-no-color-diagnostics Do not print diagnostics in color
-no-verify-emitted-module-interface
Don't check that module interfaces emitted during compilation typecheck
-no-warnings-as-errors Don't treat warnings as errors
-no-whole-module-optimization
Disable optimizing input files together instead of individually
-nostdimport Don't search the standard library import path for modules
-num-threads <n> Enable multi-threading and specify number of threads
-Onone Compile without any optimization
-Osize Compile with optimizations and target small code size
-Ounchecked Compile with optimizations and remove runtime safety checks
-output-file-map <path> A file which specifies the location of outputs
-O Compile with optimizations
-o <file> Write output to <file>
-parse-as-library Parse the input file(s) as libraries, not scripts
-parse-sil Parse the input file as SIL code, not Swift source
-parseable-output Emit textual output in a parseable format
-pretty-print Pretty-print the output JSON
-print-educational-notes
Include educational notes in printed diagnostic output, if available
-print-target-info Print target information for the given target <triple>, such as x86_64-apple-macos10.9
-profile-coverage-mapping
Generate coverage data for use with profiled execution counts
-profile-generate Generate instrumented code to collect execution counts
-profile-use=<profdata> Supply a profdata file to enable profile-guided optimization
-Rcross-import Emit a remark if a cross-import of a module is triggered.
-remove-runtime-asserts Remove runtime safety checks.
-require-explicit-availability-target <target>
Suggest fix-its adding @available(<target>, *) to public declarations without availability
-require-explicit-availability
Require explicit availability on public declarations
-Rmodule-loading Emit a remark and file path of each loaded module
-Rpass-missed=<value> Report missed transformations by optimization passes whose name matches the given POSIX regular expression
-Rpass=<value> Report performed transformations by optimization passes whose name matches the given POSIX regular expression
-runtime-compatibility-version <value>
Link compatibility library for Swift runtime version, or 'none'
-sanitize-coverage=<type>
Specify the type of coverage instrumentation for Sanitizers and additional options separated by commas
-sanitize-recover=<check>
Specify which sanitizer runtime checks (see -sanitize=) will generate instrumentation that allows error recovery. Listed checks should be comma separated. Default behavior is to not allow error recovery.
-sanitize=<check> Turn on runtime checks for erroneous behavior.
-save-optimization-record-passes <regex>
Only include passes which match a specified regular expression inthe generated optimization record (by default, include all passes)
-save-optimization-record-path <value>
Specify the file name of any generated optimization record
-save-optimization-record=<format>
Generate an optimization record file in a specific format (default: YAML)
-save-optimization-record
Generate a YAML optimization record file
-save-temps Save intermediate compilation results
-sdk <sdk> Compile against <sdk>
-serialize-diagnostics Serialize diagnostics in a binary format
-static-executable Statically link the executable
-static-stdlib Statically link the Swift standard library
-static Make this module statically linkable and make the output of -emit-library a static library.
-suppress-warnings Suppress all warnings
-swift-version <vers> Interpret input according to a specific Swift language version number
-target-cpu <value> Generate code for a particular CPU variant
-target-variant <value> Generate 'zippered' code for macCatalyst that can run on the specified variant target triple in addition to the main -target triple
-target <triple> Generate code for the given target <triple>, such as x86_64-apple-macos10.9
-tools-directory <directory>
Look for external executables (ld, clang, binutils) in <directory>
-track-system-dependencies
Track system dependencies while emitting Make-style dependencies
-use-ld=<value> Specifies the linker to be used
-verify-debug-info Verify the binary representation of debug output.
-verify-emitted-module-interface
Check that module interfaces emitted during compilation typecheck
-version Print version information and exit
-vfsoverlay <value> Add directory to VFS overlay file
-v Show commands to run and use verbose output
-warn-implicit-overrides
Warn about implicit overrides of protocol members
-warn-swift3-objc-inference-complete
Warn about deprecated @objc inference in Swift 3 for every declaration that will no longer be inferred as @objc in Swift 4
-warn-swift3-objc-inference-minimal
Warn about deprecated @objc inference in Swift 3 based on direct uses of the Objective-C entrypoint
-warnings-as-errors Treat warnings as errors
-whole-module-optimization
Optimize input files together instead of individually
-working-directory <path>
Resolve file paths relative to the specified directory
-Xcc <arg> Pass <arg> to the C/C++/Objective-C compiler
-Xlinker <value> Specifies an option which should be passed to the linker
SEE ALSO: swift build, swift run, swift package, swift test
These aren't compilers, which means they're a bit less rigidly "professional" in their output and have a bit more style about themselves. Rome especially is very clear in its hierarchy and visual weighting, but it's also very long - trade-offs.
Some of these tools of these are definitely pushing the ANSI to HTML systems in my tooling, so forgive some ASCII/color errors. I'll get it fixed with time.
Rome's help output is coming up next, and it is probably my favourite of the whole set. Very effective use of bold, strong lines for delination between section and taking the width into account all make for a very polished introduction to the tool.
$ /home/runner/work/compiler-error-messages/compiler-error-messages/node_modules/.bin/rome --help
Usage ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
rome [command] [flags]
Global Flags ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
--auxiliary-diagnostic-format <input> When printing diagnostics, output another
format alongside - values "github-actions")
--benchmark Run a command multiple times, calculating
average
--benchmark-iterations <num> The amount of benchmark iterations to perform
- default 10
--collect-markers Collect and write performance markers to disk
--cwd <path> Specify a different working directory
--fieri Head to flavortown
--grep <input> Only display diagnostics with messages
containing this string - default ""
--help Show this help screen
--inverse-grep Flip grep match. Only display diagnostics with
messages that do NOT contain the grep string
--log-path <path> Path where to output logs. When omitted logs
are not written anywhere
--logs Output server logs
--log-shell-completions <shell> Generate shell completion commands - values
"fish" "bash")
--log-workers Output worker logs
--markers-path <path> Path where to write markers. When ommitted
defaults to Marker-TIMESTAMP.json
--max-diagnostics <num> Cap the amount of diagnostics displayed -
default 20
--no-profile-workers Exclude workers from profile
--output-color-depth <num> Change the display width. By default it is
automatically inferred and updated from the
terminal.
--output-columns <num> Change the display width. By default it is
automatically inferred and updated from the
terminal.
--output-format <input> Change the output format. By default it is
automatically inferred from terminal settings.
- values "ansi" "html" "none")
--output-redirect-error Redirect stderr to stdout.
--output-tty Treat output as TTY regardless of terminal
information. This will enable things like ANSI
cursor, progress bars etc.
--profile Collect and write profile to disk. Includes
profiles for all processes.
--profile-path <path> Path where to write profile. When omitted
defaults to Profile-TIMESTAMP.json
--profile-sampling <microsec> Profiler sampling interval in microseconds -
default 100
--profile-timeout <millisec> Stop the profile after the milliseconds
specified. When omitted the profile is of the
whole command
--rage Create a rage tarball of debug information
--rage-path <path> Path where to write rage tarball. When omitted
defaults to Rage-TIMESTAMP.tgz
--resolver-mocks Enable mocks for module resolution
--resolver-platform <platform> Specify the platform for module resolution -
values "ios" "android" "mobile" "electron"
"web" "node")
--resolver-scale <num> Specify the image scale for module resolution
--review Display and perform actions on diagnostics.
Only some commands support this.
--show-all-diagnostics Display all diagnostics ignoring caps
--silent Don't write anything to the console
--temporary-daemon Start a daemon, if one isn't already running,
for the lifetime of this command
--timing Dump timing information after running the
command
--unsafe-writes When writing files, don't verify mtime or
existence. Potentially dangerous and could
lead to unintended data loss
--verbose-diagnostics Display hidden and truncated diagnostic
information
--version Show the version
--watch Keep running command and update on file
changes. Only some commands support this.
--write-shell-completions <shell> Write shell completion commands - values
"fish" "bash")
Commands ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Code Quality Commands
- check run lint against a set of files
Internal Commands
- format formats a single file
- json dump an RJSON file to regular JSON
- logs view the logs stream
- noop do nothing
- rage create a rage archive for debugging
Process Management Commands
- init initialise the project
- restart restart daemon
- start start daemon (if none running)
- status get the current daemon status
- stop stop a running daemon if one exists
Project Management Commands
- config disable modify a project config- set the <key> to false
- config enable modify a project config- set the <key> to true
- config location show the config location
- config push modify a project config - push <values> to <key>
- config set modify a project config - set the <key> to <value>
- config set-directory modify a project config - set the <key> to <value>
- lsp connect to an lsp
Source Code Commands
- cache clear clear the cache directory
- cache dir show the location of the cache directory
- recover apply apply a specific patch from the recovery store
- recover clear clear the contents of the recovery store
- recover diff show the differences that would be applied for a given patch
- recover dir print the location of the recovery store
- recover list show all patches in the recovery store
- recover pop apply the most recent patch in the recovery story
ℹ To view help for a specific command run
$ rome command_name --help
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Jest has a static line width, and does a good job of wrapping the long paragraphs for the bazillion config options.
$ /home/runner/work/compiler-error-messages/compiler-error-messages/node_modules/.bin/jest --help
Usage: jest [--config=<pathToConfigFile>] [TestPathPattern]
Options:
--help, -h Show help [boolean]
--version, -v Print the version and exit [boolean]
--all The opposite of `onlyChanged`. If `onlyChanged`
is set by default, running jest with `--all`
will force Jest to run all tests instead of
running only tests related to changed files.
[boolean]
--automock Automock all files by default. [boolean]
--bail, -b Exit the test suite immediately after `n` number
of failing tests. [boolean]
--browser Respect the "browser" field in package.json when
resolving modules. Some packages export
different versions based on whether they are
operating in node.js or a browser. [boolean]
--cache Whether to use the transform cache. Disable the
cache using --no-cache. [boolean]
--cacheDirectory The directory where Jest should store its cached
dependency information. [string]
--changedFilesWithAncestor Runs tests related to the current changes and
the changes made in the last commit. Behaves
similarly to `--onlyChanged`. [boolean]
--changedSince Runs tests related to the changes since the
provided branch. If the current branch has
diverged from the given branch, then only
changes made locally will be tested. Behaves
similarly to `--onlyChanged`. [string]
--ci Whether to run Jest in continuous integration
(CI) mode. This option is on by default in most
popular CI environments. It will prevent
snapshots from being written unless explicitly
requested. [boolean] [default: true]
--clearCache Clears the configured Jest cache directory and
then exits. Default directory can be found by
calling jest --showConfig [boolean]
--clearMocks Automatically clear mock calls and instances
between every test. Equivalent to calling
jest.clearAllMocks() between each test.[boolean]
--collectCoverage Alias for --coverage. [boolean]
--collectCoverageFrom A glob pattern relative to <rootDir> matching
the files that coverage info needs to be
collected from. [string]
--collectCoverageOnlyFrom Explicit list of paths coverage will be
restricted to. [array]
--color Forces test results output color highlighting
(even if stdout is not a TTY). Set to false if
you would like to have no colors. [boolean]
--colors Alias for `--color`. [boolean]
--config, -c The path to a jest config file specifying how to
find and execute tests. If no rootDir is set in
the config, the directory containing the config
file is assumed to be the rootDir for the
project.This can also be a JSON encoded value
which Jest will use as configuration. [string]
--coverage Indicates that test coverage information should
be collected and reported in the output.
[boolean]
--coverageDirectory The directory where Jest should output its
coverage files. [string]
--coveragePathIgnorePatterns An array of regexp pattern strings that are
matched against all file paths before executing
the test. If the file pathmatches any of the
patterns, coverage information will be skipped.
[array]
--coverageProvider Select between Babel and V8 to collect coverage
[choices: "babel", "v8"]
--coverageReporters A list of reporter names that Jest uses when
writing coverage reports. Any istanbul reporter
can be used. [array]
--coverageThreshold A JSON string with which will be used to
configure minimum threshold enforcement for
coverage results [string]
--debug Print debugging info about your jest config.
[boolean]
--detectLeaks **EXPERIMENTAL**: Detect memory leaks in tests.
After executing a test, it will try to garbage
collect the global object used, and fail if it
was leaked [boolean] [default: false]
--detectOpenHandles Print out remaining open handles preventing Jest
from exiting at the end of a test run. Implies
`runInBand`. [boolean] [default: false]
--env The test environment used for all tests. This
can point to any file or node module. Examples:
`jsdom`, `node` or `path/to/my-environment.js`
[string]
--errorOnDeprecated Make calling deprecated APIs throw helpful error
messages. [boolean] [default: false]
--expand, -e Use this flag to show full diffs instead of a
patch. [boolean]
--filter Path to a module exporting a filtering function.
This method receives a list of tests which can
be manipulated to exclude tests from running.
Especially useful when used in conjunction with
a testing infrastructure to filter known broken
tests. [string]
--findRelatedTests Find related tests for a list of source files
that were passed in as arguments. Useful for
pre-commit hook integration to run the minimal
amount of tests necessary. [boolean]
--forceExit Force Jest to exit after all tests have
completed running. This is useful when resources
set up by test code cannot be adequately cleaned
up. [boolean]
--globalSetup The path to a module that runs before All Tests.
[string]
--globalTeardown The path to a module that runs after All Tests.
[string]
--globals A JSON string with map of global variables that
need to be available in all test environments.
[string]
--haste A JSON string with map of variables for the
haste module system [string]
--init Generate a basic configuration file [boolean]
--injectGlobals Should Jest inject global variables or not
[boolean]
--json Prints the test results in JSON. This mode will
send all other test output and user messages to
stderr. [boolean]
--lastCommit Run all tests affected by file changes in the
last commit made. Behaves similarly to
`--onlyChanged`. [boolean]
--listTests Lists all tests Jest will run given the
arguments and exits. Most useful in a CI system
together with `--findRelatedTests` to determine
the tests Jest will run based on specific files
[boolean] [default: false]
--logHeapUsage Logs the heap usage after every test. Useful to
debug memory leaks. Use together with
`--runInBand` and `--expose-gc` in node.
[boolean]
--mapCoverage Maps code coverage reports against original
source code when transformers supply source
maps.
DEPRECATED [boolean]
--maxConcurrency Specifies the maximum number of tests that are
allowed to runconcurrently. This only affects
tests using `test.concurrent`.
[number] [default: 5]
--maxWorkers, -w Specifies the maximum number of workers the
worker-pool will spawn for running tests. This
defaults to the number of the cores available on
your machine. (its usually best not to override
this default) [string]
--moduleDirectories An array of directory names to be searched
recursively up from the requiring module's
location. [array]
--moduleFileExtensions An array of file extensions your modules use.
If you require modules without specifying a
file extension, these are the extensions Jest
will look for. [array]
--moduleNameMapper A JSON string with a map from regular
expressions to module names or to arrays of
module names that allow to stub out resources,
like images or styles with a single module
Prettier's help does a good job of categorizing different types of settings via a hierarchy.
$ /home/runner/work/compiler-error-messages/compiler-error-messages/node_modules/.bin/prettier --help
Usage: prettier [options] [file/dir/glob ...]
By default, output is written to stdout.
Stdin is read if it is piped to Prettier and no files are given.
Output options:
-c, --check Check if the given files are formatted, print a human-friendly summary
message and paths to unformatted files (see also --list-different).
-l, --list-different Print the names of files that are different from Prettier's formatting (see also --check).
-w, --write Edit files in-place. (Beware!)
Format options:
--arrow-parens <always|avoid>
Include parentheses around a sole arrow function parameter.
Defaults to always.
--no-bracket-spacing Do not print spaces between brackets.
--embedded-language-formatting <auto|off>
Control how Prettier formats quoted code embedded in the file.
Defaults to auto.
--end-of-line <lf|crlf|cr|auto>
Which end of line characters to apply.
Defaults to lf.
--html-whitespace-sensitivity <css|strict|ignore>
How to handle whitespaces in HTML.
Defaults to css.
--jsx-bracket-same-line Put > on the last line instead of at a new line.
Defaults to false.
--jsx-single-quote Use single quotes in JSX.
Defaults to false.
--parser <flow|babel|babel-flow|babel-ts|typescript|espree|meriyah|css|less|scss|json|json5|json-stringify|graphql|markdown|mdx|vue|yaml|html|angular|lwc>
Which parser to use.
--print-width <int> The line length where Prettier will try wrap.
Defaults to 80.
--prose-wrap <always|never|preserve>
How to wrap prose.
Defaults to preserve.
--quote-props <as-needed|consistent|preserve>
Change when properties in objects are quoted.
Defaults to as-needed.
--no-semi Do not print semicolons, except at the beginning of lines which may need them.
--single-quote Use single quotes instead of double quotes.
Defaults to false.
--tab-width <int> Number of spaces per indentation level.
Defaults to 2.
--trailing-comma <es5|none|all>
Print trailing commas wherever possible when multi-line.
Defaults to es5.
--use-tabs Indent with tabs instead of spaces.
Defaults to false.
--vue-indent-script-and-style
Indent script and style tags in Vue files.
Defaults to false.
Config options:
--config <path> Path to a Prettier configuration file (.prettierrc, package.json, prettier.config.js).
--no-config Do not look for a configuration file.
--config-precedence <cli-override|file-override|prefer-file>
Define in which order config files and CLI options should be evaluated.
Defaults to cli-override.
--no-editorconfig Don't take .editorconfig into account when parsing configuration.
--find-config-path <path>
Find and print the path to a configuration file for the given input file.
--ignore-path <path> Path to a file with patterns describing files to ignore.
Defaults to .prettierignore.
--plugin <path> Add a plugin. Multiple plugins can be passed as separate `--plugin`s.
Defaults to [].
--plugin-search-dir <path>
Custom directory that contains prettier plugins in node_modules subdirectory.
Overrides default behavior when plugins are searched relatively to the location of
I wrote this CLI, sure, but I think I did a pretty good job on offering a bunch of ways to go from here in the "footer" which hasn't really been represented other than Jest's mention of the website.
$ /home/runner/work/compiler-error-messages/compiler-error-messages/node_modules/.bin/danger --help
Usage: danger [options] [command]
Options:
-V, --version output the version number
-h, --help output usage information
Commands:
init Helps you get started with Danger
ci Runs Danger on CI
process Like `ci` but lets another process handle evaluating a Dangerfile
pr Runs your local Dangerfile against an existing GitHub PR. Will not post on the PR
runner Runs a dangerfile against a DSL passed in via STDIN [You probably don't need this]
local Runs danger standalone on a repo, useful for git hooks
reset-status Set the status of a PR to pending when a new CI run starts
help [cmd] display help for [cmd]
Docs:
-> Getting started:
http://danger.systems/js/guides/getting_started.html
-> The Dangerfile
http://danger.systems/js/guides/the_dangerfile.html
-> API Reference
http://danger.systems/js/reference.html
The GitHub CLI does a good job of using BOLD CAPS to indicate categories, and then very predictable text output for the rest. They must have really thought about the copy for these commands because they are very terse!
Work seamlessly with GitHub from the command line.
USAGE
gh <command> <subcommand> [flags]
CORE COMMANDS
gist: Manage gists
issue: Manage issues
pr: Manage pull requests
release: Manage GitHub releases
repo: Create, clone, fork, and view repositories
ACTIONS COMMANDS
actions: Learn about working with GitHub actions
run: View details about workflow runs
workflow: View details about GitHub Actions workflows
ADDITIONAL COMMANDS
alias: Create command shortcuts
api: Make an authenticated GitHub API request
auth: Login, logout, and refresh your authentication
completion: Generate shell completion scripts
config: Manage configuration for gh
help: Help about any command
secret: Manage GitHub secrets
ssh-key: Manage SSH keys
FLAGS
--help Show help for command
--version Show gh version
EXAMPLES
$ gh issue create
$ gh repo clone cli/cli
$ gh pr checkout 321
ENVIRONMENT VARIABLES
See 'gh help environment' for the list of supported environment variables.
LEARN MORE
Use 'gh <command> <subcommand> --help' for more information about a command.
Read the manual at https://cli.github.com/manual
FEEDBACK
Open an issue using 'gh issue create -R github.com/cli/cli'
Including the 'give us feedback' command at the end is a nice touch too.