mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00

Adds a diff canonifier that skips diffing the places where example.bro may use MutableVal derivatives (e.g. sets/tables), which don't always generate the same ordering in the reST docs across runs.
15 lines
388 B
Python
Executable file
15 lines
388 B
Python
Executable file
#!/usr/bin/python
|
|
|
|
import sys
|
|
import re
|
|
|
|
# MutableVal derivatives (e.g. sets/tables) don't always generate the same
|
|
# ordering in the reST documentation, so just don't bother diffing
|
|
# the places where example.bro uses them.
|
|
|
|
RE1 = "\d*/tcp"
|
|
RE2 = "tcp port \d*"
|
|
|
|
for line in sys.stdin.readlines():
|
|
if re.search(RE1, line) is None and re.search(RE2, line) is None:
|
|
print line
|