mirror of
https://github.com/dlang/dmd.git
synced 2025-04-26 21:21:48 +03:00
ci(pre-commit): add git diff color configurations for better readability
This patch introduces some sensible configurations to highlight extra whitespaces and highlight differences from two very identical lines. That makes pre-commit `--show-diff-on-failure` option more readable and therefore faster to discover the issue. Signed-off-by: Luís Ferreira <contact@lsferreira.net>
This commit is contained in:
parent
cc9650ff3a
commit
18b58a50b9
1 changed files with 11 additions and 0 deletions
11
.github/workflows/pre_commit.yml
vendored
11
.github/workflows/pre_commit.yml
vendored
|
@ -18,5 +18,16 @@ jobs:
|
|||
SKIP: no-commit-to-branch
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Configure Git
|
||||
run: |
|
||||
git config --global color.diff.meta "11"
|
||||
git config --global color.diff.frag "magenta bold"
|
||||
git config --global color.diff.func "146 bold"
|
||||
git config --global color.diff.commit "yellow bold"
|
||||
git config --global color.diff.old "red bold"
|
||||
git config --global color.diff.new "green bold"
|
||||
git config --global color.diff.whitespace "red reverse"
|
||||
|
||||
git config --global diff.wsErrorHighlight "all"
|
||||
- uses: actions/setup-python@v3.0.0
|
||||
- uses: pre-commit/action@v2.0.3
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue