mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-04 10:48:32 +00:00
Add doc for E999
(#6699)
This commit is contained in:
parent
7e9023b6f8
commit
c62e544cba
2 changed files with 20 additions and 0 deletions
|
@ -21,6 +21,25 @@ impl Violation for IOError {
|
|||
}
|
||||
}
|
||||
|
||||
/// ## What it does
|
||||
/// Checks for code that contains syntax errors.
|
||||
///
|
||||
/// ## Why is this bad?
|
||||
/// Code with syntax errors cannot be executed. Such errors are likely a
|
||||
/// mistake.
|
||||
///
|
||||
/// ## Example
|
||||
/// ```python
|
||||
/// x =
|
||||
/// ```
|
||||
///
|
||||
/// Use instead:
|
||||
/// ```python
|
||||
/// x = 1
|
||||
/// ```
|
||||
///
|
||||
/// ## References
|
||||
/// - [Python documentation: Syntax Errors](https://docs.python.org/3/tutorial/errors.html#syntax-errors)
|
||||
#[violation]
|
||||
pub struct SyntaxError {
|
||||
pub message: String,
|
||||
|
|
|
@ -83,6 +83,7 @@ KNOWN_PARSE_ERRORS = [
|
|||
"mixed-spaces-and-tabs",
|
||||
"no-indented-block",
|
||||
"non-pep695-type-alias", # requires Python 3.12
|
||||
"syntax-error",
|
||||
"tab-after-comma",
|
||||
"tab-after-keyword",
|
||||
"tab-after-operator",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue