line_length: skip all hash signs starting comment

This commit is contained in:
Patryk Małek
2021-03-22 12:22:25 +01:00
parent 5d8ef2ea23
commit 328ad7fc61
2 changed files with 15 additions and 1 deletions

View File

@@ -116,6 +116,16 @@ class LineLengthTestCase(RuleTestCase):
'long_line: http://localhost/very/very/long/url\n'
'...\n', conf, problem=(2, 21))
conf = 'line-length: {max: 20, allow-non-breakable-words: true}'
self.check('---\n'
'# http://www.verylongurlurlurlurlurlurlurlurl.com\n'
'key:\n'
' value:\n', conf)
self.check('---\n'
'## http://www.verylongurlurlurlurlurlurlurlurl.com\n'
'key:\n'
' value:\n', conf)
conf = ('line-length: {max: 20, allow-non-breakable-words: true}\n'
'trailing-spaces: disable')
self.check('---\n'