-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Description
Hey! We are using Ruff in our project and have integrated it with Gitlab's codequality reports. Apart from that, we are using a few other tools using the same reports, and we have noticed that we struggle to find what kind of check is reported by Ruff in codequality report, because only the description is displayed there.
Example:
Major - Missing docstring in public package in <file>
This might be obvious for someone, but we are in the process of setting up a new repo and polishing rule configuration - removing rules that we do not like (we started from enabling all the possible rules). I noticed that pylint, on the other hand, displays it much better.
Example:
Critical - E1120: No value for argument 'url' in function call in <file>
The description from pylint contains the actual check name.
How does it look from the code?
Right now, Ruff has it implemented like this:
let value = json!({
"check_name": check_name,
"description": description,
"severity": "major",
"fingerprint": format!("{:x}", message_fingerprint),
"location": {
"path": path,
"positions": {
"begin": start_location,
"end": end_location,
},
},
});
How I would imagine it:
let value = json!({
"check_name": check_name,
"description": check_name + " " + description, # sorry for the syntax, don't know Rust at all
"severity": "major",
"fingerprint": format!("{:x}", message_fingerprint),
"location": {
"path": path,
"positions": {
"begin": start_location,
"end": end_location,
},
},
});
Optionally there could be a setting whether to display check_name + description or just description.