OpenJij/cimod

View on GitHub

Showing 247 of 247 total issues

Rename function "make_BinaryPolynomialModel_from_hising" to match the regular expression ^[a-z_][a-z0-9_]{2,}$.
Open

def make_BinaryPolynomialModel_from_hising(*args, **kwargs):

Shared coding conventions allow teams to collaborate efficiently. This rule checks that all function names match a provided regular expression.

Noncompliant Code Example

With the default provided regular expression: ^[a-z_][a-z0-9_]{2,30}$

def MyFunction(a,b):
    ...

Compliant Solution

def my_function(a,b):
    ...

Rename function "_make_BinaryPolynomialModel_from_hising_from_list" to match the regular expression ^[a-z_][a-z0-9_]{2,}$.
Open

def _make_BinaryPolynomialModel_from_hising_from_list(keys: list, values: list):

Shared coding conventions allow teams to collaborate efficiently. This rule checks that all function names match a provided regular expression.

Noncompliant Code Example

With the default provided regular expression: ^[a-z_][a-z0-9_]{2,30}$

def MyFunction(a,b):
    ...

Compliant Solution

def my_function(a,b):
    ...

Rename function "make_BinaryPolynomialModel_from_JSON" to match the regular expression ^[a-z_][a-z0-9_]{2,}$.
Open

def make_BinaryPolynomialModel_from_JSON(obj):

Shared coding conventions allow teams to collaborate efficiently. This rule checks that all function names match a provided regular expression.

Noncompliant Code Example

With the default provided regular expression: ^[a-z_][a-z0-9_]{2,30}$

def MyFunction(a,b):
    ...

Compliant Solution

def my_function(a,b):
    ...

Rename function "_make_BinaryPolynomialModel_from_hising_from_dict" to match the regular expression ^[a-z_][a-z0-9_]{2,}$.
Open

def _make_BinaryPolynomialModel_from_hising_from_dict(polynomial: dict):

Shared coding conventions allow teams to collaborate efficiently. This rule checks that all function names match a provided regular expression.

Noncompliant Code Example

With the default provided regular expression: ^[a-z_][a-z0-9_]{2,30}$

def MyFunction(a,b):
    ...

Compliant Solution

def my_function(a,b):
    ...

Rename function "_make_BinaryPolynomialModel_from_hubo_from_dict" to match the regular expression ^[a-z_][a-z0-9_]{2,}$.
Open

def _make_BinaryPolynomialModel_from_hubo_from_dict(polynomial: dict):

Shared coding conventions allow teams to collaborate efficiently. This rule checks that all function names match a provided regular expression.

Noncompliant Code Example

With the default provided regular expression: ^[a-z_][a-z0-9_]{2,30}$

def MyFunction(a,b):
    ...

Compliant Solution

def my_function(a,b):
    ...

Remove this commented out code.
Open

    """
class Variables:
    def __init__(self, bpm):
        self._bpm = bpm

Programmers should not comment out code as it bloats programs and reduces readability.

Unused code should be deleted and can be retrieved from source control history if required.

See

  • MISRA C:2004, 2.4 - Sections of code should not be "commented out".
  • MISRA C++:2008, 2-7-2 - Sections of code shall not be "commented out" using C-style comments.
  • MISRA C++:2008, 2-7-3 - Sections of code should not be "commented out" using C++ comments.
  • MISRA C:2012, Dir. 4.4 - Sections of code should not be "commented out"

Rename function "make_BinaryPolynomialModel_from_hubo" to match the regular expression ^[a-z_][a-z0-9_]{2,}$.
Open

def make_BinaryPolynomialModel_from_hubo(*args, **kwargs):

Shared coding conventions allow teams to collaborate efficiently. This rule checks that all function names match a provided regular expression.

Noncompliant Code Example

With the default provided regular expression: ^[a-z_][a-z0-9_]{2,30}$

def MyFunction(a,b):
    ...

Compliant Solution

def my_function(a,b):
    ...
Severity
Category
Status
Source
Language