Skip to content

Commit 1eaf735

Browse files
committed
fix(workflow): Fixed some other false positives found.
1 parent 90943ca commit 1eaf735

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

.github/workflows/code-quality.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ jobs:
257257
else
258258
if echo "$line" | grep -E "^\+" >/dev/null; then
259259
# Only new lines should be auto checked for this type of code quality
260-
if echo "$line" | grep -E "(border(\.width)?|spacing|pointSize|radius|margin(s)?): [0-9]+" >/dev/null; then
260+
if echo "$line" | grep -E "(border(\.width)?|spacing|pointSize|radius|margin(s)?): [1-9]+[0-9]*" >/dev/null; then
261261
print_line "$h_priority" "$line_index" 'Do not use hardcoded values, always prefer to use the `Style` singleton instead' "$line"
262262
issues=$((issues + 1))
263263
fi
@@ -279,7 +279,7 @@ jobs:
279279
print_line "$l_priority" "$line_index" 'When it comes to translations there is no need for fallback values. From: `pluginApi?.tr("example") || "value"`. To: `pluginApi?.tr("example")`' "$line"
280280
issues=$((issues + 1))
281281
fi
282-
if echo "$line" | grep -E "(text|label|description): *(\"|').*(\"|')" >/dev/null; then
282+
if echo "$line" | grep -E "(text|label|description): *(\"|').+(\"|')" >/dev/null; then
283283
print_line "$h_priority" "$line_index" 'Use translations instead of hardcoded text. Instead of: `"Example Label"`. To: `pluginApi?.tr("panel.example-label")`' "$line"
284284
issues=$((issues + 1))
285285
fi

0 commit comments

Comments
 (0)