scripts: Don't check removed files
This commit is contained in:
parent
7790175043
commit
047e4076c1
1 changed files with 3 additions and 3 deletions
|
@ -207,7 +207,7 @@ run_rustfmt() {
|
||||||
|
|
||||||
|
|
||||||
if [[ $git_staged -eq 1 ]]; then
|
if [[ $git_staged -eq 1 ]]; then
|
||||||
staged_files=`git diff --name-only --cached | grep '.rs$'`
|
staged_files=`git diff --name-only --cached | xargs ls -d 2>/dev/null | grep '.rs$'`
|
||||||
result=0
|
result=0
|
||||||
for file in ${staged_files[@]}; do
|
for file in ${staged_files[@]}; do
|
||||||
if ! cargo +nightly fmt -- --unstable-features --skip-children --check $file; then
|
if ! cargo +nightly fmt -- --unstable-features --skip-children --check $file; then
|
||||||
|
@ -284,7 +284,7 @@ run_typos() {
|
||||||
echo ""
|
echo ""
|
||||||
fi
|
fi
|
||||||
|
|
||||||
staged_files=`git diff --name-only --cached`
|
staged_files=`git diff --name-only --cached | xargs ls -d 2>/dev/null`
|
||||||
|
|
||||||
if ! typos --color always ${staged_files}; then
|
if ! typos --color always ${staged_files}; then
|
||||||
echo -e " Checking spelling mistakes result: $fail"
|
echo -e " Checking spelling mistakes result: $fail"
|
||||||
|
@ -506,7 +506,7 @@ echo ""
|
||||||
check_potfiles
|
check_potfiles
|
||||||
echo ""
|
echo ""
|
||||||
if [[ $git_staged -eq 1 ]]; then
|
if [[ $git_staged -eq 1 ]]; then
|
||||||
staged_files=`git diff --name-only --cached | grep data/resources/resources.gresource.xml`
|
staged_files=`git diff --name-only --cached | xargs ls -d 2>/dev/null | grep data/resources/resources.gresource.xml`
|
||||||
if [[ -z $staged_files ]]; then
|
if [[ -z $staged_files ]]; then
|
||||||
check_resources
|
check_resources
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue