@@ -20,9 +20,11 @@ You can copy/paste the following snippet into your `.pre-commit-config.yaml` fil
2020 # Visit the project home page to learn more about the available Hooks,
2121 # including useful arguments you might want to pass into them.
2222 #
23- # When passing options to hooks, use a trailing '--' argument to separate
24- # the hook options from the modified-file list that Pre-Commit passes in.
25- # For repo-based hooks, the '--' is optional.
23+ # NOTE: When passing options to hooks, if your options contain a reference
24+ # to an existing file, then you will need to use a trailing '--'
25+ # argument to separate the hook options from the modified-file list
26+ # that Pre-Commit passes into the hook.
27+ # For repo-based hooks, '--' is not needed.
2628 #
2729 # Consider adding aliases to longer-named hooks for easier CLI usage.
2830 # ==========================================================================
@@ -125,17 +127,19 @@ For file and repo-based hooks, this isn't an issue, but for module and package-b
125127# ## Useful Hook Parameters
126128```
127129- id: hook-id
128- args: [ arg1, arg2, ..., '--'] # Pass options (end with '--')
130+ args: [ arg1, arg2, ..., '--'] # Pass options ('--' is optional )
129131 always_run: true # Run even if no matching files staged
130132 alias: hook-alias # Create an alias
131133```
132134
133135#### Passing Options To Hooks
134136You can pass options into individual hooks to customize tool behavior.
135137
136- Use a trailing `'--'` argument to separate the hook options from the modified-file list that Pre-Commit passes into the hook.
138+ If your options contain a reference to an existing file, then you
139+ will need to use a trailing `'--'` argument to separate the hook options from
140+ the modified-file list that Pre-Commit passes into the hook.
137141
138- For repo-based hooks, the `'--'` is optional
142+ **NOTE:** For repo-based hooks, `'--'` is not needed.
139143
140144See each hook's description below for some popular options that you might want to use.
141145
0 commit comments