| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
There was a problem hiding this comment.
This PR improves error handling for CodeQL configuration by classifying invalid config files and missing query files as ConfigurationErrors. The changes introduce JSON schema validation for config files and better error classification to provide users with clearer feedback when their configurations are malformed.
Copilot reviewed 17 out of 19 changed files in this pull request and generated 2 comments.
Show a summary per file| File | Description |
|---|---|
| src/error-messages.ts | Adds new error message functions for config file parsing and validation errors |
| src/db-config-schema.json | Defines comprehensive JSON schema for CodeQL database configuration validation |
| src/config/db-config.ts | Implements parseUserConfig function with JSON schema validation and updates type definitions |
| src/config/db-config.test.ts | Adds tests for the new parseUserConfig function covering valid YAML and error cases |
| src/config-utils.ts | Updates config loading to use the new parseUserConfig function for better error handling |
| src/cli-errors.ts | Expands error pattern matching to include missing query file scenarios |
| src/cli-errors.test.ts | Adds test case for unknown query file error classification |
| src/status-report.ts | Updates query rendering to use new renderQueryInput helper function |
| lib/* | Generated JavaScript files reflecting the TypeScript changes |
Sorry, something went wrong.
- Throws a `ConfigurationError` if parsing the YAML fails - Add a couple of tests for it
There was a problem hiding this comment.
The comments I made earlier were valid for instructions in general, but the CLI is actually more strict about instructions included in a UserConfig. So I think this is good to go as is.
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Classifies two additional types of errors as ConfigurationErrors:
Best reviewed commit-by-commit.
Risk assessment
For internal use only. Please select the risk level of this change:
Which use cases does this change impact?
How did/will you validate this change?
If something goes wrong after this change is released, what are the mitigation and rollback strategies?
How will you know if something goes wrong after this change is released?
Merge / deployment checklist