codeql/csharp/fix-whitespaces.sh

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

24 строки
454 B
Bash
Исходник Обычный вид История

2018-08-03 15:10:22 +03:00
BASEDIR=$(dirname "$0")
cat > "$BASEDIR/reformat.vim" <<"EOF"
:set ff=unix ts=2 et
:retab!
:%s/\r//g
:%s/ \+$//
:wq
EOF
2018-11-07 10:52:38 +03:00
find "$BASEDIR" \( -name "*.ql" -or -name "*.qll" -or -name "*.csv" -or -name "*.config" \) -exec vim -u /dev/null -s reformat.vim {} \;
2018-08-03 15:10:22 +03:00
cat > reformat.vim <<"EOF"
:set ff=unix ts=4 et
:retab!
:%s/\r//g
:%s/ \+$//
:wq
EOF
find "$BASEDIR" \( -name "*.cs" \) -exec vim -u /dev/null -s reformat.vim {} \;
rm "$BASEDIR/reformat.vim"