More readable error message for invalid queries block and invalid query-filters block by aeisenberg · Pull Request #1208 · github/codeql-action (original) (raw)
added 2 commits
When someone creates an invalid queries entry in the codeql config
file, like this:
queries:
- foo.qlTHe error message is confusing, looking like this:
Error: Cannot use 'in' operator to search for 'uses' in ql/ql/src
TypeError: Cannot use 'in' operator to search for 'uses' in ql/ql/src
at loadConfig (/home/runner/work/_actions/github/codeql-action/71a8b35ff4c80fcfcd05bc1cd932fe3c08f943ca/lib/config-utils.js:577:41)With this change, the error message is more comprehensible:
queries must be an array, with each entry having a 'uses' property
Handle other cases where the config is invalid.
Co-authored-by: Henry Mercer henrymercer@github.com
aeisenberg deleted the aeisenberg/better-error-message branch
aeisenberg changed the title
More readable error message for invalid More readable error message for invalid queries block and invalid query-filters bloclqueries block and invalid query-filters block
This was referenced
Dec 1, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
[ Show hidden characters]({{ revealButtonHref }})