Skip to content

Conversation

@ntBre
Copy link
Contributor

@ntBre ntBre commented Aug 13, 2025

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:

image

@ntBre ntBre added the diagnostics Related to reporting of diagnostics. label Aug 13, 2025
@github-actions
Copy link
Contributor

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

@ntBre ntBre marked this pull request as ready for review August 13, 2025 15:10
@ntBre ntBre requested a review from MichaReiser August 13, 2025 15:10
Copy link
Member

@MichaReiser MichaReiser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thank you

@ntBre ntBre merged commit 11d2cb6 into main Aug 13, 2025
36 checks passed
@ntBre ntBre deleted the brent/gitlab-description branch August 13, 2025 15:19
dcreager added a commit that referenced this pull request Aug 13, 2025
* main:
  [ty] Add precise inference for indexing, slicing and unpacking `NamedTuple` instances (#19560)
  Add rule code to GitLab description (#19896)
  [ty] render docstrings in hover (#19882)
  [ty] simplify return type of place_from_declarations (#19884)
  [ty] Various minor cleanups to tuple internals (#19891)
  [ty] Improve `sys.version_info` special casing (#19894)
dcreager added a commit that referenced this pull request Aug 13, 2025
…aints

* dcreager/inferrable: (65 commits)
  this was right after all
  mark typevars inferrable as we go
  fix tests
  fix inference of constrained typevars
  [ty] Add precise inference for indexing, slicing and unpacking `NamedTuple` instances (#19560)
  Add rule code to GitLab description (#19896)
  [ty] render docstrings in hover (#19882)
  [ty] simplify return type of place_from_declarations (#19884)
  [ty] Various minor cleanups to tuple internals (#19891)
  [ty] Improve `sys.version_info` special casing (#19894)
  Don't cache files with diagnostics (#19869)
  [ty] support recursive type aliases (#19805)
  [ty] Remove unsafe `salsa::Update` implementations in `tuple.rs` (#19880)
  [ty] Function argument inlay hints (#19269)
  [ty] Remove Salsa interning for `TypedDictType` (#19879)
  Fix `lint.future-annotations` link (#19876)
  [ty] Reduce memory usage of `TupleSpec` and `TupleType` (#19872)
  [ty] Track heap usage of salsa structs (#19790)
  Update salsa to pull in tracked struct changes (#19843)
  [ty] simplify CycleDetector::visit signature (#19873)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

diagnostics Related to reporting of diagnostics.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Change "description" key layout in gitlab output format

3 participants