Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2362 from pre-commit/deprecate-separate-entry-points
deprecate pre-commit-validate-{config,manifest}
- Loading branch information
Showing
10 changed files
with
93 additions
and
26 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,6 +1,6 @@ | ||
- id: validate_manifest | ||
name: validate pre-commit manifest | ||
description: This validator validates a pre-commit hooks manifest file | ||
entry: pre-commit-validate-manifest | ||
entry: pre-commit validate-manifest | ||
language: python | ||
files: ^(\.pre-commit-hooks\.yaml|hooks\.yaml)$ | ||
files: ^\.pre-commit-hooks\.yaml$ |
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
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
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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
from __future__ import annotations | ||
|
||
from pre_commit import clientlib | ||
|
||
|
||
def validate_config(filenames: list[str]) -> int: | ||
ret = 0 | ||
|
||
for filename in filenames: | ||
try: | ||
clientlib.load_config(filename) | ||
except clientlib.InvalidConfigError as e: | ||
print(e) | ||
ret = 1 | ||
|
||
return ret |
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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
from __future__ import annotations | ||
|
||
from pre_commit import clientlib | ||
|
||
|
||
def validate_manifest(filenames: list[str]) -> int: | ||
ret = 0 | ||
|
||
for filename in filenames: | ||
try: | ||
clientlib.load_manifest(filename) | ||
except clientlib.InvalidManifestError as e: | ||
print(e) | ||
ret = 1 | ||
|
||
return ret |
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
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
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
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
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