ruff/crates/ruff
Brent Westbrook 11d2cb6d56
Add rule code to GitLab description (#19896)
## Summary

Fixes #19881. While I was here, I also made a couple of related tweaks
to the output format. First, we don't need to strip the `SyntaxError: `
prefix anymore since that's not added directly to the diagnostic message
after #19644. Second, we can use `secondary_code_or_id` to fall back on
the lint ID for syntax errors, which changes the `check_name` from
`syntax-error` to `invalid-syntax`. And then the main change requested
in the issue, prepending the `check_name` to the description.

## Test Plan

Existing tests and a new screenshot from GitLab:

<img width="362" height="113" alt="image"
src="https://github.com/user-attachments/assets/97654ad4-a639-4489-8c90-8661c7355097"
/>
2025-08-13 11:19:26 -04:00
..
resources/test/fixtures Rename `ruff_cli` crate to `ruff` (#9557) 2024-01-16 17:47:01 -05:00
src Don't cache files with diagnostics (#19869) 2025-08-12 15:28:44 -04:00
tests Add rule code to GitLab description (#19896) 2025-08-13 11:19:26 -04:00
Cargo.toml Bump 0.12.8 (#19813) 2025-08-07 13:52:16 -05:00
build.rs Use `#[expect(lint)]` over `#[allow(lint)]` where possible (#17822) 2025-05-03 21:20:31 +02:00