6uhrmittag/taskbutler

View on GitHub

Showing 24 of 24 total issues

Merge this if statement with the enclosing one.
Open

                                    if not groceryItem['is_deleted'] and not groceryItem['in_history'] and groceryItem['parent_id'] == task['id']:
Severity: Major
Found in taskbutler/taskbutler.py by sonar-python

Merging collapsible if statements increases the code's readability.

Noncompliant Code Example

if condition1:
    if condition2:
        # ...

Compliant Solution

if condition1 and condition2:
    # ...

Remove this commented out code.
Open

            # print(folder_meta.folders[0].id)
Severity: Major
Found in taskbutler/taskbutler.py by sonar-python

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"

Refactor this function to reduce its Cognitive Complexity from 188 to the 15 allowed.
Open

def main():
Severity: Critical
Found in taskbutler/taskbutler.py by sonar-python

Cognitive Complexity is a measure of how hard the control flow of a function is to understand. Functions with high Cognitive Complexity will be difficult to maintain.

See

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

def localizePrice(value, currency) -> str:
Severity: Major
Found in taskbutler/taskbutler.py by sonar-python

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