mirror of
https://github.com/vyos/vyos-documentation.git
synced 2025-11-03 04:12:03 +01:00
linter: fix line lenght detection, strip linebreak
This commit is contained in:
parent
23fa394cb2
commit
e3e08b3af1
1
.github/vyos-linter.py
vendored
1
.github/vyos-linter.py
vendored
@ -64,6 +64,7 @@ def lint_AS(cnt, line):
|
|||||||
|
|
||||||
|
|
||||||
def lint_linelen(cnt, line):
|
def lint_linelen(cnt, line):
|
||||||
|
line = line.rstrip()
|
||||||
if len(line) > 80:
|
if len(line) > 80:
|
||||||
return (f"Line too long: len={len(line)}", cnt, 'warning')
|
return (f"Line too long: len={len(line)}", cnt, 'warning')
|
||||||
|
|
||||||
|
|||||||
@ -157,7 +157,7 @@ Please don't use other public address space.
|
|||||||
Line length
|
Line length
|
||||||
^^^^^^^^^^^
|
^^^^^^^^^^^
|
||||||
|
|
||||||
Limit all lines to a maximum of 79 characters.
|
Limit all lines to a maximum of 80 characters.
|
||||||
|
|
||||||
Except in ``.. code-block::`` because it will use the html tag ``<pre>``
|
Except in ``.. code-block::`` because it will use the html tag ``<pre>``
|
||||||
which have the save line format as in the rst file.
|
which have the save line format as in the rst file.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user