mirror of https://github.com/astral-sh/ruff
Add doc for `E999` (#6699)
This commit is contained in:
parent
7e9023b6f8
commit
c62e544cba
|
|
@ -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]
|
#[violation]
|
||||||
pub struct SyntaxError {
|
pub struct SyntaxError {
|
||||||
pub message: String,
|
pub message: String,
|
||||||
|
|
|
||||||
|
|
@ -83,6 +83,7 @@ KNOWN_PARSE_ERRORS = [
|
||||||
"mixed-spaces-and-tabs",
|
"mixed-spaces-and-tabs",
|
||||||
"no-indented-block",
|
"no-indented-block",
|
||||||
"non-pep695-type-alias", # requires Python 3.12
|
"non-pep695-type-alias", # requires Python 3.12
|
||||||
|
"syntax-error",
|
||||||
"tab-after-comma",
|
"tab-after-comma",
|
||||||
"tab-after-keyword",
|
"tab-after-keyword",
|
||||||
"tab-after-operator",
|
"tab-after-operator",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue