Skip to content

Commit 0346929

Browse files
committed
Deprecating this project in favor of the pre-commit framework
Refer-to: pre-commit - A framework for managing and maintaining multi-language pre-commit hooks <https://pre-commit.com/> Signed-off-by: 林博仁(Buo-ren Lin) <[email protected]>
1 parent 6ffb2f2 commit 0346929

File tree

3 files changed

+32
-0
lines changed

3 files changed

+32
-0
lines changed

.pre-commit-config.yaml

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Configuration for pre-commit: A framework for managing and maintaining multi-language pre-commit hooks.
2+
# https://pre-commit.com/
3+
repos:
4+
- repo: https://github.com/pre-commit/pre-commit-hooks
5+
rev: v1.2.3
6+
hooks:
7+
- id: check-yaml
8+
- id: check-executables-have-shebangs
9+
- id: check-byte-order-marker
10+
- repo: https://github.com/jumanjihouse/pre-commit-hooks
11+
rev: 1.6.0
12+
hooks:
13+
- id: shellcheck

.travis.yml

+11
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,17 @@ addons:
2525
- realpath # Merged to GNU Coreutils in Ubuntu 16.04
2626
- git # Update Git due to missing `worktree` sub-command(git-core is not enough)
2727

28+
install:
29+
- pip install --user pre-commit
30+
2831
before_script:
32+
# Run pre-commit hooks on changed file at HEAD
33+
- git diff-tree -z --no-commit-id --name-only -r HEAD | xargs --null pre-commit run --files
34+
35+
# Run shellcheck hook on all scripts in project
36+
- pre-commit run --all-files shellcheck
37+
2938
- ./"GNU Bash Automatic Checking Program for Git Projects.bash"
3039

40+
cache:
41+
pip: true

README.markdown

+8
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,14 @@ This is a program that checks all existing GNU Bash scripts for errors and poten
33

44
<https://github.com/Lin-Buo-Ren/GNU-Bash-Automatic-Checking-Program-for-Git-Projects>
55

6+
## Deprecation Notice
7+
8+
This project has been superseded by [pre-commit - A framework for managing and maintaining multi-language pre-commit hooks](https://pre-commit.com/), which is far more flexible and feature-rich than this project can provide. It is recommended to use that instead.
9+
10+
A sample pre-commit and Travis CI configuration has applied to this project for reference, checkout the `.pre-commit-config.yaml` and `.travis.yml` file for more info.
11+
12+
To manually trigger a full project bash script checking, run `pre-commit run --all-files shellcheck` under the source tree in a terminal.
13+
614
## 特色<br>Features
715
* Only scripts in project will be checked, not scripts in submodules, that's their problem
816
* Directory named with \*.bash will be omitted

0 commit comments

Comments
 (0)