[llvm] Exclude documentation files from 80 columns rule in Coding Standard (PR #197666)
Aaron Ballman via llvm-commits
llvm-commits at lists.llvm.org
Fri May 15 04:41:58 PDT 2026
================
@@ -460,6 +460,9 @@ and would be detrimental to printing out code. Also many other projects have
standardized on 80 columns, so some people have already configured their editors
for it (vs something else, like 90 columns).
+However, documentation files are not source code files, and instead of fitting into 80 columns, they must be formatted to one sentence per line.
+This way a change in the middle of a paragraph doesn't cause unnecessary changes in subsequent lines.
----------------
AaronBallman wrote:
> I didn't interpret the written conclusion in the RFC as prohibiting wrapping at an earlier point than the end of a sentence. I interpret it as permitting lines that go beyond 80 characters up to the end of a sentence.
I don't believe that was the conclusion of the RFC but as with all coding standards there's an expectation that exceptions will happen. I think it's worth thinking about this statement from the RFC:
> Upholding 80 column limit involves a significant amount of reflowing, especially when editing existing documentation. In the worst case, insertion of just couple of words at the beginning of a paragraph results in reflow changes until the end of the paragraph, increasing amount of work for PR author, distracting reviewers from the actual change, and polluting git blame output.
If the policy was "it's okay to soft wrap or not, either is equally preferred", that misses the pain point which caused the RFC in the first place. Soft wrapping documentation is a maintenance burden, we want less maintenance burdens. If there are times when soft wrapping *reduces* the maintenance burden, that's fine as an exception to the rule.
> If the project council meant something stronger than that (which would then render all existing documentation as out of conformance with respect to the new rules), than they should make that more explicit.
The project council comment mentions to not go changing all documentation to bring it into conformance, so I believe it was already understood that this renders all existing documentation out of conformance and that's fine. Almost any change to coding standards renders things out of conformance, we still have the "match local coding style" rules for cases where the new formatting may be disruptive with other local code and wants to deviate.
https://github.com/llvm/llvm-project/pull/197666
More information about the llvm-commits
mailing list