mirror of https://github.com/garabik/grc.git
better fix end of line stripping; strip whitespaces
This commit is contained in:
parent
c43e6a2ca3
commit
a110dd51bd
|
@ -16,7 +16,7 @@ colours=red
|
||||||
======
|
======
|
||||||
# PORTS
|
# PORTS
|
||||||
regexp=((?:\d{1,3}\.){3}\d{1,3}):(\d+)
|
regexp=((?:\d{1,3}\.){3}\d{1,3}):(\d+)
|
||||||
colours=default,blue,bold blue
|
colours=default,blue,bold blue
|
||||||
======
|
======
|
||||||
# Error Line
|
# Error Line
|
||||||
regexp=^error\s(?:\w+\s)+([a-z\-_0-9]+):(.*)$
|
regexp=^error\s(?:\w+\s)+([a-z\-_0-9]+):(.*)$
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
#
|
#
|
||||||
regexp=\b(g?cc|[gc]\+\+|g?as|ld)\b
|
regexp=\b(g?cc|[gc]\+\+|g?as|ld)\b
|
||||||
colours=white bold
|
colours=white bold
|
||||||
count=once
|
count=once
|
||||||
.........
|
.........
|
||||||
#
|
#
|
||||||
regexp=^[^:\s]*?:\d+:
|
regexp=^[^:\s]*?:\d+:
|
||||||
colours=bold magenta
|
colours=bold magenta
|
||||||
.........
|
.........
|
||||||
|
@ -11,7 +11,7 @@ regexp=^[^:\s]*?:
|
||||||
colours=cyan
|
colours=cyan
|
||||||
count=once
|
count=once
|
||||||
.........
|
.........
|
||||||
#
|
#
|
||||||
regexp=\`[A-Za-z0-9_():&*]+( const)?\'
|
regexp=\`[A-Za-z0-9_():&*]+( const)?\'
|
||||||
colours=magenta
|
colours=magenta
|
||||||
.........
|
.........
|
||||||
|
@ -28,7 +28,7 @@ regexp=\-o\s[^\s]+
|
||||||
colours=yellow
|
colours=yellow
|
||||||
.........
|
.........
|
||||||
# warning and error won't work, unless you redirect also
|
# warning and error won't work, unless you redirect also
|
||||||
# stderr to grcat
|
# stderr to grcat
|
||||||
#
|
#
|
||||||
# warning
|
# warning
|
||||||
regexp=[Ww]arning[:\b]
|
regexp=[Ww]arning[:\b]
|
||||||
|
|
|
@ -36,7 +36,7 @@ colours=red
|
||||||
# "linkdown"
|
# "linkdown"
|
||||||
regexp=linkdown
|
regexp=linkdown
|
||||||
colours=bold red
|
colours=bold red
|
||||||
-
|
-
|
||||||
|
|
||||||
# "src"
|
# "src"
|
||||||
regexp=src \S+
|
regexp=src \S+
|
||||||
|
|
|
@ -24,7 +24,7 @@ colours=bold green
|
||||||
=======
|
=======
|
||||||
# everything in parentheses
|
# everything in parentheses
|
||||||
regexp=\(.+?\)
|
regexp=\(.+?\)
|
||||||
colours=green
|
colours=green
|
||||||
count=more
|
count=more
|
||||||
=======
|
=======
|
||||||
# channel name
|
# channel name
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# Intended for colouring LDIF output (from ldap tools)
|
# Intended for colouring LDIF output (from ldap tools)
|
||||||
# comments
|
# comments
|
||||||
regexp=^#.*
|
regexp=^#.*
|
||||||
colours=green
|
colours=green
|
||||||
count=stop
|
count=stop
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
regexp=(\s|^)\d+([.,]\d+)?\s?([kKMG][bB]|[bB]|[kKMG])(?=[\s,]|$)
|
regexp=(\s|^)\d+([.,]\d+)?\s?([kKMG][bB]|[bB]|[kKMG])(?=[\s,]|$)
|
||||||
colours=yellow
|
colours=yellow
|
||||||
=======
|
=======
|
||||||
#
|
#
|
||||||
regexp=<=>
|
regexp=<=>
|
||||||
colours=yellow
|
colours=yellow
|
||||||
|
|
||||||
|
|
2
grcat
2
grcat
|
@ -135,7 +135,7 @@ while not is_last:
|
||||||
continue
|
continue
|
||||||
if not l[0] in letters:
|
if not l[0] in letters:
|
||||||
break
|
break
|
||||||
fields = split(l.strip(), "=", 1)
|
fields = split(l.rstrip('\r\n'), "=", 1)
|
||||||
if len(fields) != 2:
|
if len(fields) != 2:
|
||||||
sys.stderr.write('Error in configuration, I expect keyword=value line\n')
|
sys.stderr.write('Error in configuration, I expect keyword=value line\n')
|
||||||
sys.stderr.write('But I got instead:\n')
|
sys.stderr.write('But I got instead:\n')
|
||||||
|
|
Loading…
Reference in New Issue