xref: /petsc/lib/petsc/bin/maint/doublelinecheck.py (revision 32986bdfaec7e6ecbf8a8ee4300cf28ab124699c)
1import sys
2
3prevf   = ''
4prevnum = -1
5fd = open(sys.argv[1])
6for a in fd.readlines():
7  aa = a.split(':')
8  f = aa[0]
9  num = int(aa[1])
10  if f == prevf and num == prevnum+1:
11    print('Found double blank line '+f+':'+str(num))
12  prevf = f
13  prevnum = num
14