Skip to content

Commit 8dc78c2

Browse files
committed
Update README
1 parent defeba2 commit 8dc78c2

File tree

1 file changed

+20
-14
lines changed

1 file changed

+20
-14
lines changed

README.md

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,39 @@
1-
# PHP Coding Standards Fixer pre-commit hook
1+
# PHP-CS-Fixer pre-commit hook
22

3-
A script to run [PHP Coding Standards Fixer](https://github.com/PHP-CS-Fixer/PHP-CS-Fixer) before committing code.
3+
A script that runs [PHP-CS-Fixer](https://github.com/PHP-CS-Fixer/PHP-CS-Fixer) before committing code.
44

5-
The fixer is run **quietly** to avoid unnecessary noise when committing code. If there are violations it is run again in verbose mode to provide more information about the violations in the commit.
5+
The fixer is **run quietly** to avoid any output. If there are violations it is run again in verbose mode to provide information about the violations.
66

7-
A full check is executed if the configuration or the Composer lock file has changed, otherwise only changed files since the last commit are checked.
7+
Only **changed files** since the the last commit are checked unless configuration files that might impact all files are changed, in which case a full check is done.
88

9-
This hook is invoked by git-commit, and [can be bypassed](https://git-scm.com/docs/githooks#_pre_commit) with the --no-verify option.
9+
The hook is invoked by `git commit`, and [can be bypassed](https://git-scm.com/docs/githooks#_pre_commit) with the `--no-verify` option.
1010

11-
```
11+
```sh
1212
git commit --no-verify
1313
```
1414

1515
## Installation
1616

17-
Create a Git hooks directory:
17+
Create the hooks directory:
1818

19-
mkdir ~/.githooks
19+
```sh
20+
mkdir ~/.githooks
21+
```
2022

21-
Download the `pre-commit` hook to:
23+
Download or copy the `pre-commit` script to:
2224

23-
~/.githooks/pre-commit
25+
```sh
26+
~/.githooks/pre-commit
27+
```
2428

2529
Make sure the file is executable:
2630

27-
chmod 744 ~/.githooks/pre-commit
31+
```sh
32+
chmod 744 ~/.githooks/pre-commit
33+
```
2834

2935
Configure the Git [hooks path](https://git-scm.com/docs/git-config#Documentation/git-config.txt-corehooksPath):
3036

31-
git config --global core.hooksPath ~/.githooks
32-
33-
Done!
37+
```sh
38+
git config --global core.hooksPath ~/.githooks
39+
```

0 commit comments

Comments
 (0)