-
-
Notifications
You must be signed in to change notification settings - Fork 727
Closed
Copy link
Labels
A-linterArea - LinterArea - LinterC-testCategory - Testing. Code is missing test cases, or a PR is adding themCategory - Testing. Code is missing test cases, or a PR is adding them
Description
Implement a test to ensure consistency between rule::default and rule::from_configuration.
Implementation Details
Add a new test that will:
- Iterate through all available linter rules
- For each rule:
- Get the default configuration using
rule::default - Get the configuration using
rule::from_configuration(null) - Assert that both configurations produce identical results
- Get the default configuration using
This will help prevent issues like #12718 where there might be discrepancies between default configurations and null configurations.
Technical Approach
- Create a new test module/function in the appropriate test directory
- Implement logic to get all available rules
- Create helper function to compare rule configurations
- Add assertions to verify equality of configurations
- Add documentation explaining the purpose of the test
Success Criteria
- All rules should be tested
- Test should fail if any rule's default configuration differs from its null configuration
- Clear error messages when discrepancies are found
Metadata
Metadata
Assignees
Labels
A-linterArea - LinterArea - LinterC-testCategory - Testing. Code is missing test cases, or a PR is adding themCategory - Testing. Code is missing test cases, or a PR is adding them