In Ruby, class names should be meaningful and concise, and follow the naming conventions. Avoid using terms that might be considered offensive, derogatory, or otherwise inappropriate. Instead, use terminology that accurately represents the functionality or role of the class.
For instance, instead of using MasterClass, consider using PrimaryClass, MainClass, or another appropriate term that doesn’t have potentially negative connotations.
Non-Compliant Code Examples
classMasterClassdefmy_methodendend
Compliant Code Examples
classPrimaryClassdefmy_methodendend
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