Skip to content

Possible false positive warnings about invalid syntax_test_ files. #30

@deathaxe

Description

@deathaxe

This action seems to print invalid warnings about malformed syntax_test files being present.

Example:

Syntax Tests (latest, master): ./Package/Property#L0
Syntax test filenames must begin with 'syntax_test_'

see: https://github.com/SublimeText/PackageDev/actions/runs/24145702504

Likely causing code:

echo "::group::Checking syntax test filenames"
for path in $(find . -iname syntax_test*); do
file="${path/$packages\/$INPUT_PACKAGE_NAME/$INPUT_PACKAGE_ROOT}"
if echo "$file" | grep -v '/syntax_test_'; then
echo "::warning file=$file::Syntax test filenames must begin with 'syntax_test_'"
fi
if head -n 1 "$path" | grep -vEq '.+\bSYNTAX TEST\b.+".+\.(sublime-syntax|tmLanguage)"'; then
echo "::warning file=$file::Syntax test file format at https://www.sublimetext.com/docs/syntax.html#testing"
fi
done
echo '::endgroup::'

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions