org.sonar.l10n.py.rules.python.S116.html Maven / Gradle / Ivy
Why is this an issue?
A naming convention in software development is a set of guidelines for naming code elements like variables, functions, and classes.
The goal of a naming convention is to make the code more readable and understandable, which makes it easier to maintain and debug. It also ensures
consistency in the code, especially when multiple developers are working on the same project.
This rule checks that field names match a provided regular expression.
Using the regular expression ^[_a-z][_a-z0-9]*$
, the noncompliant code below:
class MyClass:
myField = 1
Should be replaced with:
class MyClass:
my_field = 1
Resources
Documentation
- Python Enhancement Proposals - PEP8 - Naming Conventions
- Wikipedia - Naming Convention (programming)
© 2015 - 2024 Weber Informatics LLC | Privacy Policy