File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
crates/ruff_linter/src/message Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -42,7 +42,15 @@ mod sarif;
4242mod text;
4343
4444/// Message represents either a diagnostic message corresponding to a rule violation or a syntax
45- /// error message raised by the parser.
45+ /// error message.
46+ ///
47+ /// All of the information for syntax errors is captured in the underlying [`db::Diagnostic`], while
48+ /// rule violations can have the additional optional fields like fixes, suggestions, and (parent)
49+ /// `noqa` offsets.
50+ ///
51+ /// Note also that the we are (mis-)using the diagnostic's primary message to store the Pascal-case
52+ /// rule name, such as `MissingNewlineAtEndOfFile`, for use in retrieving the corresponding [`Rule`]
53+ /// in [`Message::rule`].
4654#[ derive( Clone , Debug , PartialEq , Eq ) ]
4755pub struct Message {
4856 pub diagnostic : db:: Diagnostic ,
You can’t perform that action at this time.
0 commit comments