Prompt
Maintain consistent naming patterns throughout the codebase to improve readability and reduce confusion:
- Use descriptive names that reflect purpose:
- Boolean functions should use prefixes like
is_,has_, orshould_(e.g.,_should_prioritise_secretsinstead of_prioritise_secrets) - Loop variables should be descriptive (e.g.,
resourceorchanged_resourceinstead ofeach) - Classes should have specific names that avoid ambiguity (e.g.,
TerraformJsonRunnerinstead ofRunner)
- Boolean functions should use prefixes like
- Follow project style conventions:
- Use snake_case for variables and functions (e.g.,
self.data_flownotself.dataflow) - Use underscores in file names instead of spaces (e.g.,
a_example_skipnota example skip) - Prefix environment variables with
CHECKOV_for internal vars - Use distinctive names for utility functions to avoid IDE confusion (e.g.,
pickle_deepcopyinstead of justdeepcopy)
- Use snake_case for variables and functions (e.g.,
- Use consistent type hint syntax:
- Prefer modern Union syntax:
str | Noneinstead ofOptional[str] - Use lowercase type aliases:
tupleinstead ofTuple
- Prefer modern Union syntax:
These conventions make code easier to understand, maintain, and debug while reducing the cognitive load for developers working across different parts of the codebase.