mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-29 00:03:44 -05:00
a22e252666
Replaced logger statements with error tagging in Controllers GitOrigin-RevId: c5231913c82f95a325f4c3ab406d89cb534835a4
15 lines
608 B
Bash
Executable file
15 lines
608 B
Bash
Executable file
# run tranformer
|
|
npx jscodeshift \
|
|
-t transform/o-error/transform.js \
|
|
--ignore-pattern=frontend/js/libraries.js \
|
|
--ignore-pattern=frontend/js/vendor \
|
|
$1
|
|
# replace blank lines in staged changed with token
|
|
git diff --ignore-all-space --ignore-blank-lines | sed 's/^\+$/\+REMOVE_ME_IM_A_BLANK_LINE/g' | git apply --reject --cached --ignore-space-change
|
|
# stage changes with token instead of blank line
|
|
git checkout .
|
|
git add -A
|
|
# delete line containing token in staged files
|
|
git diff --cached --name-only | xargs sed -i '/^REMOVE_ME_IM_A_BLANK_LINE$/d'
|
|
# fix format on modified files
|
|
make format_fix
|