I have created project rules for my automated test files. This checks if the test files are in correct structure or not. My question is as I am pretty new to cursor, I wanna know is there a way for cursor to autmatically check which test files breaks this rules? or How can I use this rules to tell which test files break the rules.
hi @Anik_Khan thank you for posting your question.
Project Rules are stored in project folder .cursor/rules/*.mdc and have usually a description that matches the purpose.
You can ask AI in Chat to use the testing rule with all test files and verify if they are correct per requirements from the test rules.
Note that if your rule file description does not match with your AI question/request, then AI may not detect the rule correctly.
Suggestion for rule files:
- Use only description OR glob OR alwaysRun: true, but not all 3 at same time.
- Make sure the rules are short, clear and do not have conflicting requirements.
- Avoid too many negative statements as that confuses AI. instead use statements that explain why something may need to be in a certain way or why it should not be that way.
Alternatively you can attach the rule file with @ in Chat, in case it is not attached automatically as there might be an issue with your rule file description or glob settings.
got it thanks
Great, let me know how it works out and if you have further questions!