Closed PabloAlexis611 closed 1 year ago
The reasoning is that in that case you actually can break the line down further. You could put a comment on one line # see:
and then the URL on the next line.
Do you want to a make PR to update the documentation with an example of a line with a long unbreakable string (like a URL) that needs to be broken down further?
Thanks @andrewimeson, I couldn't say it better :) +1 if you want to make the documentation clearer.
In the meantime I'll close this issue, since this is the expected behavior.
Hello there! I'm new to
yamllint
. I've read the documentation in regards to theline-length
rule. Funny enough, I was adding some comments to my own.yamllint
in regards to theline-length
rule itself.This was my
.yamllint
configuration:I originally expected this to pass. But line #3 and #8 throw the error that lines are too long (since I'm using the default for that). Looking back to the examples provided here, I notice that for the
allow-non-breakable-words
andallow-non-breakable-inline-mappings
examples, the documentation has an example like this instead:So, I fixed the error by removing the "See: " portion in my YAML comments. But my question is, is this intended? Shouldn't non-breakable stuff like URLs there be ignored in the
line-length
context when having those rules set?If not, then maybe a simple documentation update with an example that fails would be helpful