Skip to content

Commit 93f4f5e

Browse files
authored
Add more checks to pre-commit hook (#2500)
This PR adds several new pre-commit rules including protect against direct committing to master/maintenance branches.
1 parent ca9a3f0 commit 93f4f5e

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

.pre-commit-config.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,21 @@ repos:
1616
- repo: https://github.com/pre-commit/pre-commit-hooks
1717
rev: v5.0.0
1818
hooks:
19+
# Git
20+
- id: check-added-large-files
21+
- id: no-commit-to-branch
22+
name: "ensure no direct commit to master/maintenance branches"
23+
args: [--branch, "master", --pattern, "maintenance/.*"]
24+
- id: check-case-conflict
25+
- id: check-illegal-windows-names
26+
# Contents
1927
- id: check-ast
2028
- id: check-builtin-literals
2129
- id: check-case-conflict
2230
- id: check-executables-have-shebangs
2331
- id: check-merge-conflict
2432
- id: check-shebang-scripts-are-executable
33+
- id: check-symlinks
2534
- id: check-toml
2635
- id: debug-statements
2736
- id: destroyed-symlinks

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99
### Added
1010

1111
* Added `--target-cuda[=ARCH]` option to replace the deprecated `--target=cuda`, allowing users to build for CUDA devices with optional architecture selection using [CodePlay oneAPI plug-in](https://developer.codeplay.com/products/oneapi/nvidia/home/) [#2478](https://github.com/IntelPython/dpnp/pull/2478)
12+
* Added several new `pre-commit` rules, including protection against direct commits to master/maintenance branches [#2500](https://github.com/IntelPython/dpnp/pull/2500)
1213

1314
### Changed
1415

0 commit comments

Comments
 (0)