You've already forked lint-policy
41 lines
994 B
Markdown
41 lines
994 B
Markdown
# lint-policy-cli
|
|
|
|
[](https://crates.io/crates/lint-policy-cli)
|
|
|
|
Generate lints for Cargo.toml
|
|
|
|
## Installation
|
|
|
|
```sh
|
|
cargo install lint-policy-cli
|
|
```
|
|
|
|
## Usage
|
|
|
|
`lint-policy` accepts one or two inputs. Each input may be either:
|
|
|
|
- a Rust toolchain (for example `+1.85`)
|
|
- a TOML file
|
|
|
|
With one input, it prints the generated lint policy:
|
|
|
|
```sh
|
|
lint-policy +1.85
|
|
```
|
|
|
|
With two inputs, it prints the differences between the two policies:
|
|
|
|
```sh
|
|
lint-policy +1.86 +1.85
|
|
lint-policy +1.86 ./1.85.toml
|
|
lint-policy ./1.86.toml +1.85
|
|
```
|
|
|
|
By default, the diff compares both the presence of lints and their configured levels. To compare only the set of lint names, ignoring changes to lint levels, pass `--ignore-level`:
|
|
|
|
```sh
|
|
lint-policy --ignore-level +1.86 +1.85
|
|
```
|
|
|
|
When `--ignore-level` is enabled, only added and removed lints are reported. Lints that exist in both inputs but have different levels are treated as unchanged.
|