Adapt Code Health to your coding standards

    CodeScene penalizes repetitive code, following the idea that repetitions in test code should still be handled by creating better abstractions, just like in application code. However, there are some valid reasons for repetition in a test code. Some test frameworks encourage or require a repetitive approach, for example. To handle cases like this, CodeScene allows you to adjust the scoring for specific parts of a codebase, as documented here.


    You can create a custom rules file that you commit in each repository, and it can be made to apply to specific paths in your repository.

    Good to know

    The patterns are case-sensitive. While the pattern is case sensitive, you can manually make it case insensitive by writing a more complicated pattern, for example: [Tt]est

    As for the rule sets, there is only one pattern per rule set, so if the desired content cannot be captured by one glob pattern, and you want these to have the same overridden rules, you'd need to duplicate them.