mirror of
https://github.com/neovim/neovim.git
synced 2025-09-05 19:08:15 +00:00
build: add formatting targets for c and lua files (#19488)
The targets will only format files that have been changed in current branch compared to the master branch. This includes unstaged, staged and committed files. Add following make and cmake targets: formatc - format changed c files formatlua - format changed lua files format - run formatc and formatlua Remove scripts/uncrustify.sh as this deprecates it.
This commit is contained in:
@@ -1,11 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
# Check that you have uncrustify
|
||||
hash uncrustify
|
||||
|
||||
COMMITISH="${1:-master}"
|
||||
for file in $(git diff --diff-filter=d --name-only $COMMITISH | grep '\.[ch]$'); do
|
||||
uncrustify -c src/uncrustify.cfg -l C --replace --no-backup "$file"
|
||||
done
|
Reference in New Issue
Block a user