| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -58,6 +58,7 @@ fi | |||
| 58 | 58 | ||
| 59 | 59 | pass=0 | |
| 60 | 60 | fail=0 | |
| 61 | + skip=0 | ||
| 61 | 62 | ||
| 62 | 63 | log_section() { echo; echo "=== $1 ==="; } | |
| 63 | 64 | is_excluded() { | |
@@ -81,6 +82,7 @@ if $RUN_QUICK; then | |||
| 81 | 82 | log_section "1a/5 powrap (Zeilenumbruch auf 80 Zeichen)" | |
| 82 | 83 | if ! command -v powrap &>/dev/null; then | |
| 83 | 84 | echo "powrap nicht gefunden -- installiere mit: pip install powrap" | |
| 85 | + skip=$((skip + 1)) | ||
| 84 | 86 | else | |
| 85 | 87 | # Die CI formatiert nach jedem Push automatisch mit powrap und | |
| 86 | 88 | # committet das Ergebnis. Wer lokal nicht formatiert, bekommt beim | |
@@ -97,8 +99,15 @@ if $RUN_QUICK; then | |||
| 97 | 99 | fi | |
| 98 | 100 | ||
| 99 | 101 | log_section "1b/5 msgfmt --check (Syntax)" | |
| 100 | - msgfmt_errors=0 | ||
| 102 | + if ! command -v msgfmt &>/dev/null; then | ||
| 103 | + echo "msgfmt nicht gefunden -- gehoert zu gettext (brew install gettext)." | ||
| 104 | + echo "Schritt uebersprungen." | ||
| 105 | + skip=$((skip + 1)) | ||
| 106 | + msgfmt_errors=-1 | ||
| 107 | + fi | ||
| 108 | + msgfmt_errors=${msgfmt_errors:-0} | ||
| 101 | 109 | while IFS= read -r -d '' po; do | |
| 110 | + [[ $msgfmt_errors -lt 0 ]] && break | ||
| 102 | 111 | rel="${po#"$REPO_ROOT"/}" | |
| 103 | 112 | is_excluded "$rel" && continue | |
| 104 | 113 | if ! out=$(msgfmt --check --check-format -o /dev/null "$po" 2>&1); then | |
@@ -107,7 +116,9 @@ if $RUN_QUICK; then | |||
| 107 | 116 | msgfmt_errors=$((msgfmt_errors + 1)) | |
| 108 | 117 | fi | |
| 109 | 118 | done < <(find "$REPO_ROOT" -name "*.po" -print0) | |
| 110 | - if [[ $msgfmt_errors -eq 0 ]]; then | ||
| 119 | + if [[ $msgfmt_errors -lt 0 ]]; then | ||
| 120 | + : | ||
| 121 | + elif [[ $msgfmt_errors -eq 0 ]]; then | ||
| 111 | 122 | echo "OK -- keine Syntaxfehler." | |
| 112 | 123 | pass=$((pass + 1)) | |
| 113 | 124 | else | |
@@ -118,7 +129,7 @@ if $RUN_QUICK; then | |||
| 118 | 129 | log_section "1c/5 sphinx-lint (Backtick-/Rollen-Syntax)" | |
| 119 | 130 | if ! command -v sphinx-lint &>/dev/null; then | |
| 120 | 131 | echo "sphinx-lint nicht gefunden -- installiere mit: pip install sphinx-lint" | |
| 121 | - fail=$((fail + 1)) | ||
| 132 | + skip=$((skip + 1)) | ||
| 122 | 133 | else | |
| 123 | 134 | lint_targets=() | |
| 124 | 135 | while IFS= read -r -d '' po; do | |
@@ -139,6 +150,7 @@ if $RUN_QUICK; then | |||
| 139 | 150 | log_section "1d/5 Rollen-Konsistenz (eigener Check, kein Build noetig)" | |
| 140 | 151 | if [[ ! -f "$CHECK_ROLES_PY" ]]; then | |
| 141 | 152 | echo "check_roles.py nicht gefunden unter $CHECK_ROLES_PY -- Schritt uebersprungen." | |
| 153 | + skip=$((skip + 1)) | ||
| 142 | 154 | else | |
| 143 | 155 | if python3 "$CHECK_ROLES_PY" "$REPO_ROOT" --exclude "$(IFS=,; echo "${EXCLUDE_DIRS[*]}")"; then | |
| 144 | 156 | pass=$((pass + 1)) | |
@@ -150,6 +162,7 @@ if $RUN_QUICK; then | |||
| 150 | 162 | log_section "1e/5 Auszeichnung (ueberfluessige Backticks, Codebloecke, Literale)" | |
| 151 | 163 | if [[ ! -f "$CHECK_MARKUP_PY" ]]; then | |
| 152 | 164 | echo "check_markup.py nicht gefunden unter $CHECK_MARKUP_PY -- Schritt uebersprungen." | |
| 165 | + skip=$((skip + 1)) | ||
| 153 | 166 | else | |
| 154 | 167 | if python3 "$CHECK_MARKUP_PY" "$REPO_ROOT" \ | |
| 155 | 168 | --exclude "$(IFS=,; echo "${EXCLUDE_DIRS[*]}")" --max 10; then | |
@@ -240,7 +253,10 @@ if [[ $pass -eq 0 && $fail -eq 0 ]]; then | |||
| 240 | 253 | echo "Keine Pruefungen durchgefuehrt." | |
| 241 | 254 | exit 0 | |
| 242 | 255 | fi | |
| 243 | - echo "Bestanden: $pass Fehlgeschlagen: $fail" | ||
| 256 | + echo "Bestanden: $pass Fehlgeschlagen: $fail Uebersprungen: $skip" | ||
| 257 | + if [[ $skip -gt 0 ]]; then | ||
| 258 | + echo "Achtung: $skip Pruefung(en) konnten mangels Werkzeug nicht laufen." | ||
| 259 | + fi | ||
| 244 | 260 | if [[ $fail -eq 0 ]]; then | |
| 245 | 261 | echo "Alles sauber -- bereit zum Push." | |
| 246 | 262 | exit 0 | |
| Back | FazBrowse Home | New Git URL |
0 commit comments