Skip to content

Commit

Permalink
change underscores to dash and add to readme
Browse files Browse the repository at this point in the history
  • Loading branch information
kbrewersq committed Jan 3, 2024
1 parent 748d7bf commit 9e3aeb9
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
15 changes: 11 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,16 +97,23 @@ After adding a hook to your pre-commit config, it's not a bad idea to run `pre-c

This hook checks Munki pkginfo files to ensure they are valid.

- Specify your preferred list of pkginfo catalogs, if you wish to enforce it, followed by `--` to signal the end of the list:
- Specify your preferred list of pkginfo catalogs, if you wish to enforce it, followed by `--` to signal the end of the list:
`args: ['--catalogs', 'testing', 'stable', '--']`

- Specify your preferred list of pkginfo categories, if you wish to enforce it, followed by `--`:
- Specify your preferred list of pkginfo categories, if you wish to enforce it, followed by `--`:
`args: ['--categories', 'Productivity', 'Design', 'Utilities', 'Web Browsers', '--']`

- Specify required pkginfo keys, followed by `--`:
`args: ['--required-keys', 'category', 'description', 'developer', 'name', 'version', '--']`
- Specify required pkginfo keys, followed by `--`:
`args: ['--required-keys', 'category', 'description', 'developer', 'name', 'version', '--']`
(default: description, name)

- Specify an alternate munki repo location by passing the argument:
`args: ['--munki-repo', './my_repo_location']`
(default: ".")

- Choose to just warn on missing icons with a flag, note if no other issues exist this will allow pre-commit to pass without seeing the warnings:
`args: ['--warn-on-missing-icons]`

- __check-munkiadmin-scripts__

This hook ensures MunkiAdmin scripts are executable.
Expand Down
4 changes: 2 additions & 2 deletions pre_commit_hooks/check_munki_pkgsinfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ def build_argument_parser():
)
parser.add_argument("filenames", nargs="*", help="Filenames to check.")
parser.add_argument(
"--munki_repo",
"--munki-repo",
default=".",
help="path to local munki repo defaults to '.'"
)
parser.add_argument(
"--warn_on_missing_icons",
"--warn-on-missing-icons",
help="If added, this will only warn on missing icons.",
action="store_true",
default=False,
Expand Down

0 comments on commit 9e3aeb9

Please sign in to comment.