Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More readable error message for invalid queries block and invalid query-filters block #1208

Merged
merged 5 commits into from Aug 23, 2022

Commits on Aug 15, 2022

  1. More readable error message for invalid queries block

    When someone creates an invalid `queries` entry in the codeql config
    file, like this:
    
    ```
    queries:
      - foo.ql
    ```
    
    THe 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`
    aeisenberg committed Aug 15, 2022
    Copy the full SHA
    fba13b0 View commit details
    Browse the repository at this point in the history

Commits on Aug 23, 2022

  1. Better error messages for invalid queries and query filters blocks

    Handle other cases where the config is invalid.
    aeisenberg committed Aug 23, 2022
    Copy the full SHA
    5861352 View commit details
    Browse the repository at this point in the history
  2. Copy the full SHA
    ac92a02 View commit details
    Browse the repository at this point in the history
  3. Update changelog

    aeisenberg committed Aug 23, 2022
    Copy the full SHA
    9af066e View commit details
    Browse the repository at this point in the history
  4. Update CHANGELOG.md

    Co-authored-by: Henry Mercer <henrymercer@github.com>
    aeisenberg and henrymercer committed Aug 23, 2022
    Copy the full SHA
    e379edd View commit details
    Browse the repository at this point in the history