Skip to content

Commit

Permalink
Merge branch 'uyuni-project:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
mbussolotto authored May 16, 2024
2 parents 4c275bc + 1204d5b commit e7bae1d
Show file tree
Hide file tree
Showing 45 changed files with 11,567 additions and 7,690 deletions.
6 changes: 3 additions & 3 deletions check_localizable
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# SPDX-License-Identifier: Apache-2.0

res=0
grep -r . --include '*.go' --exclude '*_test.go' -n \
grep -r . --include '*.go' --exclude '*_test.go' --exclude-dir='vendor' -n \
-e 'fmt\.Errorf("[^"]\+"' \
-e 'errors.New("[^"]\+"' \
-e '\(Fatal\|Error\|Info\|Warn\)()\(\.Err(err)\)\?\.Msgf\?("' \
Expand All @@ -17,15 +17,15 @@ if test $? -eq 0; then
res=1
fi

grep -r . --include '*.go' --exclude '*_test.go' -n \
grep -r . --include '*.go' --exclude '*_test.go' --exclude-dir='vendor' -n \
-e '\(Trace\|Debug\)()\(\.Err(err)\)\?\.Msgf\?(P\?N\?L("' \

if test $? -eq 0; then
echo -e "Trace and debug messages shouldn't be localizable\n"
res=1
fi

grep -r . --include '*.go' --exclude '*_test.go' -n \
grep -r . --include '*.go' --exclude '*_test.go' --exclude-dir='vendor' -n \
-e '\(Short\|Long\): \+P\?N\?L(["`][a-z]'
if test $? -eq 0; then
echo -e "Short and Long messages shouldn't start with a lowercase letter\n"
Expand Down
Loading

0 comments on commit e7bae1d

Please sign in to comment.