Skip to content

Commit e990275

Browse files
authored
Merge pull request #79 from n8felton/plist-format-xml
Adding new plist-format-xml hook
2 parents f39601b + 66422b8 commit e990275

3 files changed

Lines changed: 15 additions & 1 deletion

File tree

.pre-commit-hooks.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,3 +132,11 @@
132132
language: python
133133
pass_filenames: false
134134
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]

CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ All notable changes to this project will be documented in this file. This projec
1212

1313
## [Unreleased]
1414

15-
Nothing yet.
15+
### Added
16+
17+
- New `plist-format-xml` hook to auto-format XML property list (plist) files to use tabs instead of spaces, and will alphabetically sort keys.
1618

1719
## [1.15.0] - 2024-02-11
1820

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ After adding a hook to your pre-commit config, it's not a bad idea to run `pre-c
4444

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

47+
- __plist-format-xml__
48+
49+
This hook will auto-format XML property list (plist) files to use tabs instead of spaces, and will alphabetically sort keys.
50+
4751
### [AutoPkg](https://github.com/autopkg/autopkg)
4852

4953
- __check-autopkg-recipe-list__

0 commit comments

Comments
 (0)