Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 73 additions & 0 deletions examples/cargo-clippy.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
{
"description": "Checks a package to catch common mistakes and improve your Rust code.",
"name": "cargo clippy",
"usage": "cargo clippy [OPTIONS] [--] [<ARGS>...]",
"options": [
{
"option": "--allow",
"shortcut": "-A",
"description": "Set lint allowed",
"value": "[LINT]"
},
{
"option": "--deny",
"shortcut": "-D",
"description": "Set lint denied",
"value": "[LINT]"
},
{
"option": "--explain",
"description": "Print the documentation for a given lint",
"value": "[LINT]"
},
{
"option": "--fix",
"description": "Automatically apply lint suggestions. This flag implies --no-deps and --all-targets"
},
{
"option": "--forbid",
"shortcut": "-F",
"description": "Set lint forbidden",
"value": "[LINT]"
},
{
"option": "--frozen",
"description": "Require Cargo.lock and cache are up to date"
},
{
"option": "--help",
"shortcut": "-h",
"description": "Print this message"
},
{
"option": "--locked",
"description": "Require Cargo.lock is up to date"
},
{
"option": "--manifest-path",
"description": "Path to Cargo.toml",
"value": "<PATH>"
},
{
"option": "--no-deps",
"description": "Run Clippy only on the given crate, without linting the dependencies"
},
{
"option": "--offline",
"description": "Run without accessing the network"
},
{
"option": "--version",
"shortcut": "-V",
"description": "Print version info and exit"
},
{
"option": "--warn",
"shortcut": "-W",
"description": "Set lint warnings",
"value": "[LINT]"
}
],
"subcommands": [],
"version": "0.1.90"
}
163 changes: 163 additions & 0 deletions examples/rustc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,163 @@
{
"name": "rustc",
"description": "The Rust compiler.",
"usage": "Usage: rustc [OPTIONS] INPUT",
"options": [
{
"option": "--allow",
"shortcut": "-A",
"description": "Set lint allowed",
"value": "<LINT>"
},
{
"option": "--cap-lints",
"description": "Set the most restrictive lint level. More restrictive lints are capped at this level",
"value": "<LEVEL>"
},
{
"option": "--cfg",
"description": "Configure the compilation environment. SPEC supports the syntax `<NAME>[=\"<VALUE>\"]`.",
"value": "<SPEC>"
},
{
"option": "--check-cfg",
"description": "Provide list of expected cfgs for checking",
"value": "<SPEC>"
},
{
"option": "--codegen",
"shortcut": "-C",
"description": "Set a codegen option",
"value": "<OPT>[=<VALUE>]"
},
{
"option": "--crate-name",
"description": "Specify the name of the crate being built",
"value": "<NAME>"
},
{
"option": "--crate-type",
"description": "Comma separated list of types of crates for the compiler to emit",
"value": "<bin|lib|rlib|dylib|cdylib|staticlib|proc-macro>"
},
{
"option": "--deny",
"shortcut": "-D",
"description": "Set lint denied",
"value": "<LINT>"
},
{
"option": "--edition",
"description": "Specify which edition of the compiler to use when compiling code.",
"value": "<2015|2018|2021|2024|future>",
"default": "2015"
},
{
"option": "--emit",
"description": "Comma separated list of types of output for the compiler to emit.",
"value": "<TYPE>[=<FILE>]"
},
{
"option": "--explain",
"description": "Provide a detailed explanation of an error message",
"value": "<OPT>"
},
{
"option": "--force-warn",
"description": "Set lint force-warn",
"value": "<LINT>"
},
{
"option": "--help",
"shortcut": "-h",
"description": "Display this message"
},
{
"option": "--out-dir",
"description": "Write output to compiler-chosen filename in DIR",
"value": "<DIR>"
},
{
"option": "--print",
"description": "Compiler information to print on stdout (or to a file)",
"value": "<INFO>[=<FILE>]"
},
{
"option": "--target",
"description": "Target triple for which the code is compiled",
"value": "<TARGET>"
},
{
"option": "--test",
"description": "Build a test harness"
},
{
"option": "--version",
"shortcut": "-V",
"description": "Print version info and exit"
},
{
"option": "--verbose",
"shortcut": "-v",
"description": "Use verbose output"
},
{
"option": "--warn",
"shortcut": "-W",
"description": "Set lint warnings",
"value": "<LINT>"
},
{
"option": "-C help",
"description": "Print codegen options",
"tags": [
"Additional help"
]
},
{
"option": "-F",
"shortcut": "--forbid",
"description": "Set lint forbidden",
"value": "<LINT>"
},
{
"option": "-L",
"description": "Add a directory to the library search path. The optional KIND can be one of <dependency|crate|native|framework|all> (default: all).",
"value": "[<KIND>=]<PATH>"
},
{
"option": "-O",
"description": "Equivalent to -C opt-level=3"
},
{
"option": "-W help",
"description": "Print 'lint' options and default settings",
"tags": [
"Additional help"
]
},
{
"option": "-Z help",
"description": "Print unstable compiler options",
"tags": [
"Additional help"
]
},
{
"option": "-g",
"description": "Equivalent to -C debuginfo=2"
},
{
"option": "-l",
"description": "Link the generated crate(s) to the specified native library NAME. The optional KIND can be one of <static|framework|dylib> (default: dylib). Optional comma separated MODIFIERS <bundle|verbatim|whole-archive|as-needed> may be specified each with a prefix of either '+' to enable or '-' to disable.",
"value": "[<KIND>[:<MODIFIERS>]=]<NAME>[:<RENAME>]"
},
{
"option": "-o",
"description": "Write output to FILENAME",
"value": "<FILENAME>"
}
],
"subcommands": [],
"version": "1.91.0-nightly"
}
95 changes: 95 additions & 0 deletions examples/rustfmt.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
{
"name": "rustfmt",
"description": "Format Rust code",
"usage": "rustfmt [options] <file>...",
"options": [
{
"option": "--backup",
"description": "Backup any modified files."
},
{
"option": "--check",
"description": "Run in 'check' mode. Exits with 0 if input is formatted correctly. Exits with 1 and prints a diff if formatting is required."
},
{
"option": "--color",
"description": "Use colored output (if supported)",
"value": "[always|never|auto]"
},
{
"option": "--config",
"description": "Set options from command line. These settings take priority over .rustfmt.toml",
"value": "[key1=val1,key2=val2...]"
},
{
"option": "--config-path",
"description": "Recursively searches the given path for the rustfmt.toml config file. If not found reverts to the input file path",
"value": "[Path for the configuration file]"
},
{
"option": "--edition",
"description": "Rust edition to use",
"value": "[2015|2018|2021|2024]"
},
{
"option": "--emit",
"description": "What data to emit and how",
"value": "[files|stdout|coverage|checkstyle|json]"
},
{
"option": "--error-on-unformatted",
"description": "Error if unable to get comments or string literals within max_width, or they are left with trailing whitespaces (unstable)."
},
{
"shortcut": "-l",
"option": "--files-with-diff",
"description": "Prints the names of mismatched files that were formatted. Prints the names of files that would be formatted when used with `--check` mode."
},
{
"shortcut": "-h",
"option": "--help",
"description": "Show this message or help about a specific topic: `config` or `file-lines`",
"value": "[=TOPIC]"
},
{
"option": "--file-lines",
"description": "Format specified line ranges. Run with `--help=file-lines` for more detail (unstable).",
"value": "JSON"
},
{
"shortcut": "-q",
"option": "--quiet",
"description": "Print less output"
},
{
"option": "--print-config",
"description": "Dumps a default or minimal config to PATH. A minimal config is the subset of the current config file used for formatting the current program. `current` writes to stdout current config as if formatting the file at PATH.",
"value": "[default|minimal|current] PATH"
},
{
"option": "--skip-children",
"description": "Don't reformat child modules (unstable)."
},
{
"option": "--style-edition",
"description": "The edition of the Style Guide.",
"value": "[2015|2018|2021|2024]"
},
{
"option": "--unstable-features",
"description": "Enables unstable features. Only available on nightly channel."
},
{
"shortcut": "-v",
"option": "--verbose",
"description": "Print verbose output"
},
{
"shortcut": "-V",
"option": "--version",
"description": "Show version information"
}
],
"subcommands": [],
"version": "1.8.0-nightly"
}