diff options
Diffstat (limited to 'usr/src/tools/scripts/git-pbchk.py')
-rw-r--r-- | usr/src/tools/scripts/git-pbchk.py | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/usr/src/tools/scripts/git-pbchk.py b/usr/src/tools/scripts/git-pbchk.py index 656e22f6b4..55d80d8f3f 100644 --- a/usr/src/tools/scripts/git-pbchk.py +++ b/usr/src/tools/scripts/git-pbchk.py @@ -17,6 +17,7 @@ # # Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. # Copyright 2008, 2012 Richard Lowe +# Copyright 2014 Garrett D'Amore <garrett@damore.org> # import getopt @@ -48,7 +49,7 @@ sys.path.insert(1, os.path.join(os.path.dirname(__file__), "..", "lib", sys.path.insert(2, os.path.join(os.path.dirname(__file__), "..")) from onbld.Checks import Comments, Copyright, CStyle, HdrChk -from onbld.Checks import JStyle, Keywords, Mapfile +from onbld.Checks import JStyle, Keywords, ManLint, Mapfile class GitError(Exception): @@ -282,6 +283,16 @@ def jstyle(root, parent, flist, output): return ret +def manlint(root, parent, flist, output): + ret = 0 + output.write("Man page format:\n") + ManfileRE = re.compile(r'.*\.[0-9][a-z]*$', re.IGNORECASE) + for f in flist(lambda x: ManfileRE.match(x)): + fh = open(f, 'r') + ret |= ManLint.manlint(fh, output=output, picky=True) + fh.close() + return ret + def keywords(root, parent, flist, output): ret = 0 output.write("SCCS Keywords:\n") @@ -323,6 +334,7 @@ def nits(root, parent, paths): hdrchk, jstyle, keywords, + manlint, mapfilechk] run_checks(root, parent, cmds, paths) @@ -334,6 +346,7 @@ def pbchk(root, parent, paths): hdrchk, jstyle, keywords, + manlint, mapfilechk] run_checks(root, parent, cmds) |