/
githubmirror
/
sssd
Обзор
Документация
Войти
/
githubmirror
/
sssd
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
src/tests/double_semicolon_test
44 строки
1 KB
Gleb Popov
Skip whitespace and double semicolon tests on FreeBSD
20 янв 2026, 20:54
20 янв 2026, 20:54
308bacb
Код
Авторство
О чём код?
#!/usr/bin/env bash set -e -u -o pipefail # An AWK regex matching tracked file paths to be included for the search. # Example: '.*\.po|README' PATH_INCLUDE_REGEX='.*\.c|.*\.h' export GIT_DIR="$ABS_TOP_SRCDIR/.git" export GIT_WORK_TREE="$ABS_TOP_SRCDIR" if [ ! -d "$GIT_DIR" ]; then echo "Git repository is required for this test!" 1>&2 exit 77 fi if [ $(uname -s) = "FreeBSD" ]; then echo "Regular expressions that are passed to git by this test" 1>&2 echo "are unsupported by FreeBSD libc in the REG_BASIC mode" 1>&2 exit 77 fi { # Look for lines with double semicolon at the end of line # in all files tracked by Git git grep -n -I ';\s*;$' -- "$(git rev-parse --show-toplevel)" || # Don't fail if no such lines were found anywhere [[ $? == 1 ]] } | awk -- " BEGIN { found = 0 } /^($PATH_INCLUDE_REGEX):/ { if (!found) { print \"Double semicolon found:\" found = 1 } print } END { exit found } "