mirror of
https://github.com/github/codeql.git
synced 2025-12-28 06:36:33 +01:00
Merge pull request #78 from github/rasmuswl/syntax-error-query
This commit is contained in:
17
ql/src/Debug/SyntaxError.ql
Normal file
17
ql/src/Debug/SyntaxError.ql
Normal file
@@ -0,0 +1,17 @@
|
||||
/**
|
||||
* @name Syntax error
|
||||
* @description A piece of code could not be parsed due to syntax errors.
|
||||
* @kind problem
|
||||
* @problem.severity recommendation
|
||||
* @id actions/syntax-error
|
||||
* @tags reliability
|
||||
* correctness
|
||||
* language-features
|
||||
* debug
|
||||
* @precision very-high
|
||||
*/
|
||||
|
||||
private import codeql.actions.ast.internal.Yaml
|
||||
|
||||
from YamlParseError pe
|
||||
select pe, pe.getMessage()
|
||||
7
ql/test/query-tests/SyntaxError/.github/workflows/malformed.yml
vendored
Normal file
7
ql/test/query-tests/SyntaxError/.github/workflows/malformed.yml
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
on: pull_request_target
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- run: echo ${{ github.event.pull_request.body}}
|
||||
1
ql/test/query-tests/SyntaxError/SyntaxError.expected
Normal file
1
ql/test/query-tests/SyntaxError/SyntaxError.expected
Normal file
@@ -0,0 +1 @@
|
||||
| .github/workflows/malformed.yml:7:4:7:4 | expected <block end>, but found '<block sequence start>' | expected <block end>, but found '<block sequence start>' |
|
||||
1
ql/test/query-tests/SyntaxError/SyntaxError.qlref
Normal file
1
ql/test/query-tests/SyntaxError/SyntaxError.qlref
Normal file
@@ -0,0 +1 @@
|
||||
Debug/SyntaxError.ql
|
||||
1
ql/test/query-tests/SyntaxError/options
Normal file
1
ql/test/query-tests/SyntaxError/options
Normal file
@@ -0,0 +1 @@
|
||||
semmle-extractor-options: --tolerate-parse-errors --experimental
|
||||
Reference in New Issue
Block a user