mirror of
https://github.com/danbulant/oxc
synced 2026-05-19 12:19:15 +00:00
parent
1965aa6b63
commit
955a4b4479
3 changed files with 27 additions and 26 deletions
|
|
@ -77,13 +77,13 @@ pub struct BasicOptions {
|
|||
/// Accumulate rules and categories from left to right on the command-line.
|
||||
/// For example `-D correctness -A no-debugger` or `-A all -D no-debugger`.
|
||||
/// The categories are:
|
||||
/// * `correctness` - code that is outright wrong or useless (default)
|
||||
/// * `suspicious` - code that is most likely wrong or useless
|
||||
/// * `pedantic` - lints which are rather strict or have occasional false positives
|
||||
/// * `style` - code that should be written in a more idiomatic way
|
||||
/// * `nursery` - new lints that are still under development
|
||||
/// * `restriction` - lints which prevent the use of language and library features
|
||||
/// * `all` - all the categories listed above except nursery
|
||||
/// * `correctness` - code that is outright wrong or useless (default).
|
||||
/// * `suspicious` - code that is most likely wrong or useless.
|
||||
/// * `pedantic` - lints which are rather strict or have occasional false positives.
|
||||
/// * `style` - code that should be written in a more idiomatic way.
|
||||
/// * `nursery` - new lints that are still under development.
|
||||
/// * `restriction` - lints which prevent the use of language and library features.
|
||||
/// * `all` - all the categories listed above except nursery. Does not enable plugins automatically.
|
||||
///
|
||||
/// Arguments:
|
||||
// ^ This shows up on the website but not from the cli's `--help`.
|
||||
|
|
@ -120,14 +120,14 @@ impl LintFilter {
|
|||
#[derive(Debug, Clone, Bpaf)]
|
||||
pub struct FixOptions {
|
||||
/// Fix as many issues as possible. Only unfixed issues are reported in the output
|
||||
#[bpaf(switch)]
|
||||
#[bpaf(switch, hide_usage)]
|
||||
pub fix: bool,
|
||||
/// Apply auto-fixable suggestions. May change program behavior.
|
||||
#[bpaf(switch)]
|
||||
#[bpaf(switch, hide_usage)]
|
||||
pub fix_suggestions: bool,
|
||||
|
||||
/// Apply dangerous fixes and suggestions.
|
||||
#[bpaf(switch)]
|
||||
#[bpaf(switch, hide_usage)]
|
||||
pub fix_dangerously: bool,
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ expression: snapshot
|
|||
|
||||
|
||||
## Usage
|
||||
**`oxlint`** \[**`-c`**=_`<./oxlintrc.json>`_\] \[**`--fix`**\] \[**`--fix-suggestions`**\] \[**`--fix-dangerously`**\] \[_`PATH`_\]...
|
||||
**`oxlint`** \[**`-c`**=_`<./oxlintrc.json>`_\] \[_`PATH`_\]...
|
||||
|
||||
## Basic Configuration
|
||||
- **`-c`**, **`--config`**=_`<./oxlintrc.json>`_ —
|
||||
|
|
@ -24,13 +24,13 @@ Accumulate rules and categories from left to right on the command-line.
|
|||
|
||||
For example `-D correctness -A no-debugger` or `-A all -D no-debugger`.
|
||||
The categories are:
|
||||
* `correctness` - code that is outright wrong or useless (default)
|
||||
* `suspicious` - code that is most likely wrong or useless
|
||||
* `pedantic` - lints which are rather strict or have occasional false positives
|
||||
* `style` - code that should be written in a more idiomatic way
|
||||
* `nursery` - new lints that are still under development
|
||||
* `restriction` - lints which prevent the use of language and library features
|
||||
* `all` - all the categories listed above except nursery
|
||||
* `correctness` - code that is outright wrong or useless (default).
|
||||
* `suspicious` - code that is most likely wrong or useless.
|
||||
* `pedantic` - lints which are rather strict or have occasional false positives.
|
||||
* `style` - code that should be written in a more idiomatic way.
|
||||
* `nursery` - new lints that are still under development.
|
||||
* `restriction` - lints which prevent the use of language and library features.
|
||||
* `all` - all the categories listed above except nursery. Does not enable plugins automatically.
|
||||
|
||||
Arguments:
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
source: tasks/website/src/linter/cli.rs
|
||||
expression: snapshot
|
||||
---
|
||||
Usage: [-c=<./oxlintrc.json>] [--fix] [--fix-suggestions] [--fix-dangerously] [PATH]...
|
||||
Usage: [-c=<./oxlintrc.json>] [PATH]...
|
||||
|
||||
Basic Configuration
|
||||
-c, --config=<./oxlintrc.json> Oxlint configuration file (experimental)
|
||||
|
|
@ -15,13 +15,14 @@ Allowing / Denying Multiple Lints
|
|||
Accumulate rules and categories from left to right on the command-line.
|
||||
For example `-D correctness -A no-debugger` or `-A all -D no-debugger`.
|
||||
The categories are:
|
||||
* `correctness` - code that is outright wrong or useless (default)
|
||||
* `suspicious` - code that is most likely wrong or useless
|
||||
* `pedantic` - lints which are rather strict or have occasional false positives
|
||||
* `style` - code that should be written in a more idiomatic way
|
||||
* `nursery` - new lints that are still under development
|
||||
* `restriction` - lints which prevent the use of language and library features
|
||||
* `all` - all the categories listed above except nursery
|
||||
* `correctness` - code that is outright wrong or useless (default).
|
||||
* `suspicious` - code that is most likely wrong or useless.
|
||||
* `pedantic` - lints which are rather strict or have occasional false positives.
|
||||
* `style` - code that should be written in a more idiomatic way.
|
||||
* `nursery` - new lints that are still under development.
|
||||
* `restriction` - lints which prevent the use of language and library features.
|
||||
* `all` - all the categories listed above except nursery. Does not enable plugins
|
||||
automatically.
|
||||
-A, --allow=NAME Allow the rule or category (suppress the lint)
|
||||
-W, --warn=NAME Deny the rule or category (emit a warning)
|
||||
-D, --deny=NAME Deny the rule or category (emit an error)
|
||||
|
|
|
|||
Loading…
Reference in a new issue