mirror of
https://github.com/astral-sh/ty.git
synced 2025-08-04 19:08:30 +00:00
Minor adjustments to docs (#752)
This commit is contained in:
parent
3634c41020
commit
75af7fca4d
5 changed files with 16 additions and 15 deletions
|
@ -2,10 +2,12 @@
|
|||
|
||||
The ty command line interface uses the following exit codes:
|
||||
|
||||
- `0` if no violations with severity `error` or higher were found.
|
||||
- `1` if any violations with severity `error` were found.
|
||||
- `2` if ty terminates abnormally due to invalid CLI options.
|
||||
- `101` if ty terminates abnormally due to an internal error.
|
||||
| Exit code | Description |
|
||||
| :-------- | :------------------------------------------------------- |
|
||||
| `0` | no violations with severity `error` or higher were found |
|
||||
| `1` | violations with severity `error` or higher were found |
|
||||
| `2` | invalid CLI options |
|
||||
| `101` | internal error |
|
||||
|
||||
ty supports two command line arguments that change how exit codes work:
|
||||
|
||||
|
|
|
@ -22,10 +22,10 @@ You can configure the level for each rule on the command line using the `--warn`
|
|||
```shell
|
||||
|
||||
ty check \
|
||||
--warn unused-ignore-comment \ # Make `unused-ignore-comment` a warning
|
||||
--ignore redundant-cast \ # Disable `redundant-cast`
|
||||
--error possibly-unbound-attribute \ # Error on `possibly-unbound-attribute`
|
||||
--error possibly-unbound-import # Error on `possibly-unbound-import`
|
||||
--warn unused-ignore-comment \ # Make `unused-ignore-comment` a warning
|
||||
--ignore redundant-cast \ # Disable `redundant-cast`
|
||||
--error possibly-unbound-attribute \ # Error on `possibly-unbound-attribute`
|
||||
--error possibly-unbound-import # Error on `possibly-unbound-import`
|
||||
```
|
||||
|
||||
The options can be repeated. Subsequent options override earlier options.
|
||||
|
|
|
@ -5,7 +5,7 @@ entirely) to silence false positives or permissible violations.
|
|||
|
||||
!!! note
|
||||
|
||||
To disable a rule entirely, set it to the `ignore` level as described in [rule levels](#rule-levels).
|
||||
To disable a rule entirely, set it to the `ignore` level as described in [rule levels](rules.md/#rule-levels).
|
||||
|
||||
## ty suppression comments
|
||||
|
||||
|
|
|
@ -85,21 +85,20 @@ nav:
|
|||
- Introduction: index.md
|
||||
- Concepts:
|
||||
- Installation: installation.md
|
||||
- Module discovery: modules.md
|
||||
- Configuration: configuration.md
|
||||
- Module discovery: modules.md
|
||||
- Python version: python-version.md
|
||||
- File exclusions: exclusions.md
|
||||
- Rules: rules.md
|
||||
- Editors: editors.md
|
||||
- Suppression: suppression.md
|
||||
- Python version: python-version.md
|
||||
- Editors: editors.md
|
||||
- Reference:
|
||||
- reference/index.md
|
||||
- Configuration: reference/configuration.md
|
||||
- Rules: reference/rules.md
|
||||
- CLI: reference/cli.md
|
||||
- Exit codes: reference/exit-codes.md
|
||||
- Configuration: reference/configuration.md
|
||||
- Editor settings: reference/editor-settings.md
|
||||
- Environment variables: reference/env.md
|
||||
- Editor settings: reference/editor-settings.md
|
||||
validation:
|
||||
omitted_files: warn
|
||||
absolute_links: warn
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue