-
Notifications
You must be signed in to change notification settings - Fork 4.1k
fix: improve error messages for invalid rule files #9716
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No issues found across 1 file
| } catch (e) { | ||
| // If the file is in a rules directory, we can provide a more helpful error message | ||
| // because we know it's likely a rule definition | ||
| const isRuleFile = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is an isRuleFile util you could use here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I searched for isRuleFile but couldn't find it. I did find isColocatedRulesFile in core/config/loadLocalAssistants.ts. Is this the intended utility? Or should I create rules util file?
Please clarify me on it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sarthakNITT I was just completely wrong on this, thanks for checking
|
@RomneyDa Sure. |
Description
Checklist
issue #9548
Continue Tasks:▶️ 1 queued — View all
Summary by cubic
Improved error messages for invalid rule files in rules directories. Users now see clear YAML parsing details to quickly fix syntax issues.
Written for commit 9694b24. Summary will update on new commits.