ruff/crates/ruff_linter/src
Brent Westbrook 37fbe58b13
Document `LinterResult::has_syntax_error` and add `Parsed::has_no_syntax_errors` (#16443)
Summary
--

This is a follow up addressing the comments on #16425. As @dhruvmanila
pointed out, the naming is a bit tricky. I went with `has_no_errors` to
try to differentiate it from `is_valid`. It actually ends up negated in
most uses, so it would be more convenient to have `has_any_errors` or
`has_errors`, but I thought it would sound too much like the opposite of
`is_valid` in that case. I'm definitely open to suggestions here.

Test Plan
--

Existing tests.
2025-03-04 08:35:38 -05:00
..
checkers [`pylint`] Convert a `code` keyword argument to a positional argument (`PLR1722`) (#16424) 2025-03-03 09:20:57 -05:00
comments Update insta snapshots (#14366) 2024-11-15 19:31:15 +01:00
cst Wrap expressions in parentheses when negating (#10346) 2024-03-11 18:20:55 -04:00
docstrings bump MSRV to 1.83 (#16294) 2025-02-26 06:12:43 -08:00
fix Avoid removing too many imports in `redefined-while-unused` (#15585) 2025-01-19 13:28:08 -05:00
importer Recognize all symbols named `TYPE_CHECKING` for `in_type_checking_block` (#15719) 2025-02-06 14:45:12 +01:00
message Add new rule RUF059: Unused unpacked assignment (#16449) 2025-03-03 10:51:36 +01:00
registry Increase rule set size (#14689) 2024-11-30 15:12:10 +01:00
rules [`pyupgrade`] Do not offer fix when at least one target is `global`/`nonlocal` (`UP028`) (#16451) 2025-03-04 11:28:01 +01:00
settings Escape template filenames in glob patterns (#16407) 2025-03-03 09:29:58 -05:00
snapshots [`isort`] Omit trailing whitespace in `unsorted-imports` (`I001`) (#15518) 2025-01-18 11:08:58 -06:00
codes.rs Add new rule RUF059: Unused unpacked assignment (#16449) 2025-03-03 10:51:36 +01:00
directives.rs Use bitshift consistently for bitflag definitions (#14265) 2024-11-11 10:20:17 +00:00
doc_lines.rs Extract `LineIndex` independent methods from `Locator` (#13938) 2024-10-28 07:53:41 +00:00
fs.rs Escape template filenames in glob patterns (#16407) 2025-03-03 09:29:58 -05:00
lib.rs Detect empty implicit namespace packages (#14236) 2024-11-09 22:03:34 -05:00
line_width.rs Upgrade to Rust 1.78 (#11260) 2024-05-03 12:46:21 +00:00
linter.rs Document `LinterResult::has_syntax_error` and add `Parsed::has_no_syntax_errors` (#16443) 2025-03-04 08:35:38 -05:00
locator.rs test: another update to add back a caret 2025-01-15 13:37:52 -05:00
logging.rs Bump MSRV to Rust 1.80 (#13826) 2024-10-20 10:55:36 +02:00
noqa.rs Upgrade Rust toolchain to 1.84.0 (#15408) 2025-01-11 09:51:58 +01:00
package.rs Detect empty implicit namespace packages (#14236) 2024-11-09 22:03:34 -05:00
packaging.rs Nested namespace packages support (#10541) 2024-03-24 22:53:32 -04:00
pyproject_toml.rs Update pyproject-toml to 0.8 (#8351) 2023-10-30 10:05:37 +00:00
registry.rs Sort linters alphabetically (#16168) 2025-02-14 22:05:08 +01:00
renamer.rs Add `per-file-target-version` option (#16257) 2025-02-24 08:47:13 -05:00
rule_redirects.rs Add a test for overshadowing redirects (#15259) 2025-01-05 09:47:01 +01:00
rule_selector.rs Remove test rules from JSON schema (#15627) 2025-01-24 10:17:59 +05:30
source_kind.rs Simplify iteration idioms (#13834) 2024-10-20 22:25:27 +01:00
test.rs Document `LinterResult::has_syntax_error` and add `Parsed::has_no_syntax_errors` (#16443) 2025-03-04 08:35:38 -05:00
text_helpers.rs Handle non-printable characters in diff view (#11687) 2024-06-08 06:22:03 +00:00
upstream_categories.rs Fix pylint upstream categories not showing in docs (#10441) 2024-03-18 01:27:39 +00:00