summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorrebortg <github@ghlr.de>2020-12-11 14:33:14 +0100
committerrebortg <github@ghlr.de>2020-12-11 14:33:14 +0100
commit2cc025a619ae94e8e59eb1a79c10fc74e9a3a59f (patch)
treef3c7db7e7b6da8ae5ec65abfd98a123577978c18 /.github
parent3ba03aeed5cd1a70bb0f9aa71439af25656781fc (diff)
downloadvyos-documentation-2cc025a619ae94e8e59eb1a79c10fc74e9a3a59f.tar.gz
vyos-documentation-2cc025a619ae94e8e59eb1a79c10fc74e9a3a59f.zip
linter: improve IPv4 detection
Diffstat (limited to '.github')
-rw-r--r--.github/vyos-linter.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/.github/vyos-linter.py b/.github/vyos-linter.py
index bb58786d..ffa355c0 100644
--- a/.github/vyos-linter.py
+++ b/.github/vyos-linter.py
@@ -5,7 +5,7 @@ import sys
import ast
IPV4SEG = r'(?:25[0-5]|(?:2[0-4]|1{0,1}[0-9]){0,1}[0-9])'
-IPV4ADDR = r'(?:(?:' + IPV4SEG + r'\.){3,3}' + IPV4SEG + r')'
+IPV4ADDR = r'\b(?:(?:' + IPV4SEG + r'\.){3,3}' + IPV4SEG + r')\b'
IPV6SEG = r'(?:(?:[0-9a-fA-F]){1,4})'
IPV6GROUPS = (
r'(?:' + IPV6SEG + r':){7,7}' + IPV6SEG, # 1:2:3:4:5:6:7:8
@@ -135,6 +135,7 @@ def handle_file_action(filepath):
for error in errors:
print(f"::{error[2]} file={filepath},line={error[1]}::{error[0]}")
print('')
+ exit()
return False