dist/tools/vera++: allow comments to be overlong#21671
Conversation
The line length check is very noisy, especially in the Github web view with annotations added to every overlong line. Reducing the number of false positives there for is very valuable. In comments, we often have overlong lines e.g. because an URL is longer than 100 chars, because we add a larger markdown table, we add ASCII art to visualize data structures, or because we add dot syntax that may just need overlong lines. Since vera++ does not support annotations with magic comments to disable the length check just for a table / URL / graphic, this just disables the length checks for all comments outright.
d73e9b5 to
164918b
Compare
|
I understand the reason but I don't like the solution. Especially comments are typically too long and this might create a false negative when there is a long code line with a comment behind it that makes it even longer, which should be shortened. |
|
The oversimplified script only excludes lines that start with To be honest, I believe that vera++ is just not a suitable tool for style checking and should be dropped entirely in favor of clang-format for this task. The development of vera++ has been on hold for the last 6 years, which gives me some concern. |
|
Can we somehow integrate |
|
Similar PR to #21364. |
crasbe
left a comment
There was a problem hiding this comment.
I think I can live with disabling the check for comments, although we should still enforce line breaks where it's possible (as in: normal text).
But yeah, vera++ just doesn't seem to be up to the task 🤷
Contribution description
The line length check is very noisy, especially in the Github web view with annotations added to every overlong line. Reducing the number of false positives there for is very valuable.
In comments, we often have overlong lines e.g. because an URL is longer than 100 chars, because we add a larger markdown table, we add ASCII art to visualize data structures, or because we add dot syntax that may just need overlong lines.
Since vera++ does not support annotations with magic comments to disable the length check just for a table / URL / graphic, this just disables the length checks for all comments outright.
Testing procedure
Issues/PRs references
None