Skip to content

Commit 3b963a0

Browse files
committed
Rename hook to format-xml-plist
Matches verb-object format of other hooks
1 parent fb7757f commit 3b963a0

2 files changed

Lines changed: 15 additions & 13 deletions

File tree

.pre-commit-hooks.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -125,18 +125,18 @@
125125
files: '\.recipe(\.plist|\.yaml|\.json)?$'
126126
types: [text]
127127

128+
- id: format-xml-plist
129+
name: Auto-format plist [XML]
130+
description: Auto-format a Property List (plist) as XML.
131+
entry: plutil -convert xml1
132+
language: system
133+
files: '\.(mobileconfig|pkginfo|plist|recipe)$'
134+
types: [text]
135+
128136
- id: munki-makecatalogs
129137
name: Run Munki Makecatalogs
130138
description: This hook runs the "makecatalogs" command to ensure all referenced packages are present and catalogs are up to date.
131139
entry: munki-makecatalogs
132140
language: python
133141
pass_filenames: false
134142
always_run: true
135-
136-
- id: plist-format-xml
137-
name: Auto-format plist [XML]
138-
description: Auto-format a Property List (plist) as XML.
139-
entry: plutil -convert xml1
140-
language: system
141-
files: '\.(mobileconfig|pkginfo|plist|recipe)$'
142-
types: [text]

README.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,6 @@ After adding a hook to your pre-commit config, it's not a bad idea to run `pre-c
3232
This hook checks to ensure the Git config email matches one of the specified domains:
3333
`args: ['--domains', 'pretendco.com', 'contoso.com', '--']`
3434

35-
- __check-plists__
36-
37-
This hook checks XML property list (plist) files for basic syntax errors.
38-
3935
- __check-munkipkg-buildinfo__
4036

4137
This hook checks [MunkiPkg](https://github.com/munki/munki-pkg) build-info files to ensure they are valid.
@@ -44,10 +40,16 @@ After adding a hook to your pre-commit config, it's not a bad idea to run `pre-c
4440

4541
This hook checks [Outset](https://github.com/chilcote/outset) scripts to ensure they're executable.
4642

47-
- __plist-format-xml__
43+
- __check-plists__
44+
45+
This hook checks XML property list (plist) files for basic syntax errors. Does not modify or autoformat these files; see the `format-xml-plist` hook below if you want autoformatting.
46+
47+
- __format-xml-plist__
4848

4949
This hook will auto-format XML property list (plist) files to use tabs instead of spaces, and will alphabetically sort keys.
5050

51+
__NOTE__: This will remove any HTML-style comments `<!--like this-->` in your plist files, so convert those to `<key>Comment</key>` format first.
52+
5153
### [AutoPkg](https://github.com/autopkg/autopkg)
5254

5355
- __check-autopkg-recipe-list__

0 commit comments

Comments
 (0)