Skip to content

Commit 8db9ab6

Browse files
committed
Testing: skip cert files in GitHub workflow line length check
1 parent c9a0820 commit 8db9ab6

1 file changed

Lines changed: 17 additions & 5 deletions

File tree

.github/workflows/line-length-check.yml

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,19 @@ jobs:
4141
# Skip WolfSSLProvider.java...
4242
# that legitimately exceed 80 characters
4343
if [[ "$file" == "src/java/com/wolfssl/provider/jsse/WolfSSLProvider.java" ]]; then
44-
echo "⚠️ Skipping $file (contains security service mappings)"
44+
echo " Skipping $file (contains security service mappings)"
45+
continue
46+
fi
47+
48+
# Skip certificate and key files
49+
if [[ "$file" =~ \.(pem|crt|cer|der|key)$ ]]; then
50+
echo " Skipping $file (certificate/key file)"
51+
continue
52+
fi
53+
54+
# Skip shell scripts (often have long command lines)
55+
if [[ "$file" =~ \.sh$ ]]; then
56+
echo " Skipping $file (shell script)"
4557
continue
4658
fi
4759
@@ -72,10 +84,10 @@ jobs:
7284
[[ "$added_line" =~ ^[[:space:]]*return[[:space:]]+Java_com_wolfssl_.* ]] || \
7385
[[ "$added_line" =~ ^[[:space:]]*\(JNIEnv\*[[:space:]]+env.*\) ]] || \
7486
[[ "$added_line" =~ ^[[:space:]]*JNIEnv\*[[:space:]]+env.* ]]; then
75-
echo "⚠️ $file:$new_line_num - Skipping JNI method signature/call/parameters ($char_count characters)"
87+
echo " $file:$new_line_num - Skipping JNI method signature/call/parameters ($char_count characters)"
7688
echo " Line: $added_line"
7789
else
78-
echo " $file:$new_line_num - Line too long ($char_count characters)"
90+
echo " $file:$new_line_num - Line too long ($char_count characters)"
7991
echo " Line: $added_line"
8092
echo "violation" >> "$violations_file"
8193
fi
@@ -99,7 +111,7 @@ jobs:
99111
echo "================================================================"
100112
101113
if [[ $violation_count -gt 0 ]]; then
102-
echo " Found $violation_count line(s) exceeding 80 " \
114+
echo " Found $violation_count line(s) exceeding 80 " \
103115
"characters in PR changes"
104116
echo ""
105117
echo "Please ensure all lines are 80 characters or less " \
@@ -109,7 +121,7 @@ jobs:
109121
rm -f "$violations_file" "$changed_files"
110122
exit 1
111123
else
112-
echo "All changed lines are within the 80 character limit"
124+
echo "All changed lines are within the 80 character limit"
113125
rm -f "$violations_file" "$changed_files"
114126
exit 0
115127
fi

0 commit comments

Comments
 (0)