-
Notifications
You must be signed in to change notification settings - Fork 6
Milestone
Description
The syntax test output format has changed via sublimehq/sublime_text#3022.
Here is some example output (via):
Data path: /home/runner/work/syntax-test-action/syntax_tests/Data
Cache path: /home/runner/work/syntax-test-action/syntax_tests/Data/Cache
Packages path: /home/runner/work/syntax-test-action/syntax_tests/Data/Packages
Running: /home/runner/work/syntax-test-action/syntax_tests/Data/Packages/syntax-test-action/syntax_test_js.js
/home/runner/work/syntax-test-action/syntax_tests/Data/Packages/syntax-test-action/syntax_test_js.js:8:8
error: scope does not match
8 | param
9 | // ^^^^^ - variable.parameter.function.js
| ^^^^^ these locations did not match
actual:
| ^^^^^ source.js meta.function.parameters.js meta.binding.name.js variable.parameter.function.js
(leading whitespace is stripped, presumably by the log display)
Previously, the error message was on the same line as the rest of the metadata (file name, col, row) and I'm not sure currently if the ::error reporting can handle multiple lines.
Code that needs updating:
syntax-test-action/syntax-tests.sh
Lines 165 to 170 in 6e133e4
| if [[ "$line" == "$packages/$INPUT_PACKAGE_NAME/"* ]]; then | |
| IFS=$':' read -r path row col message <<< "$line" | |
| file="${path/$packages\/$INPUT_PACKAGE_NAME/$INPUT_PACKAGE_ROOT}" | |
| # https://help.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-an-error-message | |
| echo "::error file=$file,line=$row,col=$col::${message# }" | |
| fi |
The updated logic also needs to be conditional since the format has began with build 4181.
Documentation: https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/workflow-commands-for-github-actions
michaelblyons and keith-hall
Metadata
Metadata
Assignees
Labels
No labels