Skip to content

Conversation

@robertbrignull
Copy link
Contributor

Improves the error message when the user specifies languages that doesn't exist. Currently it does something ugly like saying A fatal error occurred: c-code-scanning.qls is not a well-known query suite. but this will make it much nicer. Also adds support for some well known aliases for languages that people might try. This feature is perhaps more debatable, but it might be nice to have since people are more likely to type "c" than to know that CodeQL uses "cpp" to refer to both.

Also includes unit tests of the check for no languages, because I forgot to add that when doing that.

Here are some tests / demos:

Merge / deployment checklist

  • Confirm this change is backwards compatible with existing workflows.
  • Confirm the readme has been updated if necessary.

@robertbrignull
Copy link
Contributor Author

Ah good, that fixes the tests. They passed for me locally the whole time which made it hard to debug.

Copy link
Contributor

@chrisgavin chrisgavin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome. I tried it out with PHP as a language and indeed the error was much better.

@robertbrignull robertbrignull merged commit 6e18b27 into main Aug 10, 2020
@robertbrignull robertbrignull deleted the invalid_language branch August 10, 2020 09:36
@robertbrignull robertbrignull mentioned this pull request Aug 10, 2020
2 tasks
@github-actions github-actions bot mentioned this pull request Aug 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants