mirror of
https://github.com/bitwarden/server.git
synced 2025-06-19 18:38:03 -05:00
15 lines
434 B
Bash
Executable File
15 lines
434 B
Bash
Executable File
#!/bin/sh
|
|
|
|
FILES=$(git diff --cached --name-only --diff-filter=ACMR | sed 's| |\\ |g')
|
|
[ -z "$FILES" ] && exit 0
|
|
|
|
if npx mega-linter-runner --containername "megalinter-incremental" \
|
|
--flavor formatters --remove-container --fix --env "'APPLY_FIXES=all'" \
|
|
--env "'CLEAR_REPORT_FOLDER=true'" --env "'LOG_LEVEL=warning'" \
|
|
--filesonly $FILES; then
|
|
echo "$FILES" | xargs git add
|
|
exit 0
|
|
fi
|
|
|
|
exit 1
|