summaryrefslogtreecommitdiff
path: root/usr/src/tools/scripts/git-pbchk.py
diff options
context:
space:
mode:
authorAndy Fiddaman <omnios@citrus-it.co.uk>2021-11-05 22:51:46 +0000
committerAndy Fiddaman <omnios@citrus-it.co.uk>2021-11-15 21:42:02 +0000
commit86d4171132ce4f4c1345b7ce0d5048577e1f3976 (patch)
treee4f668e6580226de0c3ea156d690b1448857e37c /usr/src/tools/scripts/git-pbchk.py
parent8e458de0baeb1fee50643403223bc7e909a48464 (diff)
downloadillumos-gate-86d4171132ce4f4c1345b7ce0d5048577e1f3976.tar.gz
14218 Package manifests could be maintained in v2 format
Reviewed by: Yuri Pankov <ypankov@tintri.com> Reviewed by: Hans Rosenfeld <rosenfeld@grumpf.hope-2000.org> Approved by: Rich Lowe <richlowe@richlowe.net>
Diffstat (limited to 'usr/src/tools/scripts/git-pbchk.py')
-rw-r--r--usr/src/tools/scripts/git-pbchk.py14
1 files changed, 13 insertions, 1 deletions
diff --git a/usr/src/tools/scripts/git-pbchk.py b/usr/src/tools/scripts/git-pbchk.py
index 26c73ca590..141a0c3c68 100644
--- a/usr/src/tools/scripts/git-pbchk.py
+++ b/usr/src/tools/scripts/git-pbchk.py
@@ -57,7 +57,7 @@ sys.path.insert(2, os.path.join(os.path.dirname(__file__), ".."))
from onbld.Scm import Ignore
from onbld.Checks import Comments, Copyright, CStyle, HdrChk, WsCheck
from onbld.Checks import JStyle, Keywords, ManLint, Mapfile, SpellCheck
-from onbld.Checks import ShellLint
+from onbld.Checks import ShellLint, PkgFmt
class GitError(Exception):
pass
@@ -315,6 +315,16 @@ def shelllint(root, parent, flist, output):
return ret
+def pkgfmt(root, parent, flist, output):
+ ret = 0
+ output.write("Package manifests:\n")
+
+ for f in flist(lambda x: x.endswith('.mf')):
+ with io.open(f, mode='rb') as fh:
+ ret |= PkgFmt.check(fh, output=output)
+
+ return ret
+
def keywords(root, parent, flist, output):
ret = 0
output.write("SCCS Keywords:\n")
@@ -421,6 +431,7 @@ def nits(root, parent, paths):
manlint,
mapfilechk,
shelllint,
+ pkgfmt,
winnames,
wscheck]
scmds = [symlinks]
@@ -436,6 +447,7 @@ def pbchk(root, parent, paths):
manlint,
mapfilechk,
shelllint,
+ pkgfmt,
winnames,
wscheck]
scmds = [symlinks]