TanVD/Grazi

[Rust] Readability: paragraph over 80 words

0ndorio opened this issue · 1 comments

The Readability: paragraph over 80 words is always triggered inside a rust-doc comment as soon as the comment has more than 80 words, regardless of the amounts of empty lines between between the paragraphs inside the comment.

Example

/// Do something useful.
/// 
/// This must not be called if you want to ensure that the program itself
/// doesn't do something useful. In case you still feel like calling the
/// function, we wish you best luck but please ensure to encapsulate the
/// call with at least 5 empty lines in front and afterwards.
/// 
/// # Example
/// 
/// ```no_run
/// let _ = my_cool_function();
/// ```
/// 
/// # Safety
/// 
/// This function is going to trigger undefined behavior in any case, but hey
/// we don't care.

It seems like the leading /// prefix is recognized as part of the content and therefore prevents the Grazi to recognize the paragraph split.

TanVD commented

Yeah, the main problem is that Rust plugin do not parse documentation (it only highlights it via layered lexers). So we are parsing text on ourselves pretending that it is one paragraph of content. We've already contacted Rust team regarding documentation parsing and expect it to be done in future versions.