CiviWiki/OpenCiviWiki

View on GitHub

Showing 22,315 of 22,315 total issues

Incorrect end of line character(s) found.
Open

    class Meta:
Severity: Minor
Found in project/threads/serializers.py by editorconfig

Incorrect end of line character(s) found.
Open

            "id",
Severity: Minor
Found in project/threads/serializers.py by editorconfig

Incorrect end of line character(s) found.
Open

        )
Severity: Minor
Found in project/threads/serializers.py by editorconfig

Incorrect end of line character(s) found.
Open

        request = self.context.get("request")
Severity: Minor
Found in project/threads/serializers.py by editorconfig

Incorrect end of line character(s) found.
Open

        if request and hasattr(request, "user"):
Severity: Minor
Found in project/threads/serializers.py by editorconfig

Incorrect end of line character(s) found.
Open

                {
Severity: Minor
Found in project/threads/serializers.py by editorconfig

Incorrect end of line character(s) found.
Open

        fields = (
Severity: Minor
Found in project/threads/serializers.py by editorconfig

Incorrect end of line character(s) found.
Open

    author = UserListSerializer(required=False)
Severity: Minor
Found in project/threads/serializers.py by editorconfig

Incorrect end of line character(s) found.
Open

            "author",
Severity: Minor
Found in project/threads/serializers.py by editorconfig

Incorrect end of line character(s) found.
Open

            "num_civis",
Severity: Minor
Found in project/threads/serializers.py by editorconfig

Incorrect end of line character(s) found.
Open

        else:
Severity: Minor
Found in project/threads/serializers.py by editorconfig

Either remove or fill this block of code.
Open

            pass
Severity: Major
Found in project/accounts/views.py by sonar-python

Most of the time a block of code is empty when a piece of code is really missing. So such empty block must be either filled or removed.

Noncompliant Code Example

for i in range(3):
    pass

Exceptions

When a block contains a comment, this block is not considered to be empty.

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

def upload_civi_image(request):
Severity: Critical
Found in project/threads/api.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

Either remove or fill this block of code.
Open

            pass
Severity: Major
Found in project/accounts/views.py by sonar-python

Most of the time a block of code is empty when a piece of code is really missing. So such empty block must be either filled or removed.

Noncompliant Code Example

for i in range(3):
    pass

Exceptions

When a block contains a comment, this block is not considered to be empty.

Merge this if statement with the enclosing one.
Open

            if category_id != "all":
Severity: Major
Found in project/threads/views.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:
    # ...
Severity
Category
Status
Source
Language