-
-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: run pre-commit hooks only on passed files (#356)
- Loading branch information
1 parent
2760922
commit 3db024a
Showing
1 changed file
with
13 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,23 @@ | ||
# https://pre-commit.com/#creating-new-hooks | ||
- id: nitpick | ||
name: "Nitpick (Flake8 plugin, check only)" | ||
description: "Enforce the same settings across multiple language-independent projects (Flake8 plugin, check only)" | ||
name: "Nitpick Flake8 plugin (check only)" | ||
description: "Run as a flake8 plugin and only check configuration files, according to the Nitpick style" | ||
entry: flake8 --select=NIP | ||
language: python | ||
types: [python] | ||
always_run: true | ||
stages: [commit] | ||
- id: nitpick-run | ||
name: "Nitpick (CLI, apply changes)" | ||
description: "Enforce the same settings across multiple language-independent projects (command-line tool, apply changes)" | ||
|
||
- id: nitpick-fix | ||
name: "Nitpick CLI (fix files)" | ||
description: "Fix configuration files automatically, according to the Nitpick style" | ||
entry: nitpick run | ||
language: python | ||
always_run: true | ||
pass_filenames: false | ||
stages: [commit] | ||
|
||
- id: nitpick-check | ||
name: "Nitpick CLI (check files only)" | ||
description: "Only check configuration files, according to the Nitpick style" | ||
entry: nitpick run --check | ||
language: python | ||
stages: [commit] |