This rule checks the comments in your Ruby code for potentially insensitive or inappropriate wording. It specifically flags terms considered problematic due to historical connotations.
To avoid violating this rule, use neutral, descriptive terms in your comments. For example, instead of using “master”, you could use terms like “primary”, “main”, or “leader”.
Non-Compliant Code Examples
# masterprint("foo")
Compliant Code Examples
# primaryprint("foo")
Seamless integrations. Try Datadog Code Analysis
Datadog Code Analysis
Try this rule and analyze your code with Datadog Code Analysis
How to use this rule
1
2
rulesets:- ruby-inclusive # Rules to enforce Ruby inclusive.
Create a static-analysis.datadog.yml with the content above at the root of your repository
Use our free IDE Plugins or add Code Analysis scans to your CI pipelines