melexis/sphinx-traceability-extension

View on GitHub

Showing 126 of 141 total issues

Formatting a regular string which could be a f-string
Open

                    report_warning('Item-matrix with title {!r} has bad coverage: {} evaluates to False'

Used when we detect a string that is being formatted with format() or % which could potentially be a f-string. The use of f-strings is preferred. Requires Python 3.6 and py-version >= 3.6.

Formatting a regular string which could be a f-string
Open

                report_warning('Traceability: unknown relation for item-tree: %s' % rel, env.docname, self.lineno)

Used when we detect a string that is being formatted with format() or % which could potentially be a f-string. The use of f-strings is preferred. Requires Python 3.6 and py-version >= 3.6.

Merge this if statement with the enclosing one.
Open

            if target in database[relation]:

Merging collapsible if statements increases the code's readability.

Noncompliant Code Example

if condition1:
    if condition2:
        # ...

Compliant Solution

if condition1 and condition2:
    # ...

subprocess call - check for execution of untrusted input.
Open

    plantuml_path = subprocess.check_output(["whereis", "-u", "plantuml"])
Severity: Info
Found in doc/conf.py by bandit

Formatting a regular string which could be a f-string
Open

            selectors = ".{0}:active,\n.{0}:hover".format(class_name)
Severity: Info
Found in mlx/traceability/traceability.py by pylint

Used when we detect a string that is being formatted with format() or % which could potentially be a f-string. The use of f-strings is preferred. Requires Python 3.6 and py-version >= 3.6.

Formatting a regular string which could be a f-string
Open

            report_warning("Your custom attribute {!r} overlaps with an option of directive(s) {!r} in which your "
Severity: Info
Found in mlx/traceability/traceability.py by pylint

Used when we detect a string that is being formatted with format() or % which could potentially be a f-string. The use of f-strings is preferred. Requires Python 3.6 and py-version >= 3.6.

Consider iterating with .items()
Open

        for attribute in self.attributes:
Severity: Info
Found in mlx/traceability/traceable_item.py by pylint

Emitted when iterating over the keys of a dictionary and accessing the value by index lookup. Both the key and value can be accessed by iterating using the .items() method of the dictionary instead.

Formatting a regular string which could be a f-string
Open

            retval += '\tAttribute {attribute} = {value}\n'.format(attribute=attribute,
Severity: Info
Found in mlx/traceability/traceable_item.py by pylint

Used when we detect a string that is being formatted with format() or % which could potentially be a f-string. The use of f-strings is preferred. Requires Python 3.6 and py-version >= 3.6.

Formatting a regular string which could be a f-string
Open

                expression = '{} {}'.format(percentage, self['coverage'])

Used when we detect a string that is being formatted with format() or % which could potentially be a f-string. The use of f-strings is preferred. Requires Python 3.6 and py-version >= 3.6.

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

    def process_options(self, node, options, docname=None):

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

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

    def _postprocess_tbody(self, tbody):

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

Starting a process with a partial executable path
Open

    plantuml_path = subprocess.check_output(["whereis", "-u", "plantuml"])
Severity: Info
Found in doc/conf.py by bandit

Formatting a regular string which could be a f-string
Open

            report_warning("The arguments of the '{}' option must be space-separated without commas; "

Used when we detect a string that is being formatted with format() or % which could potentially be a f-string. The use of f-strings is preferred. Requires Python 3.6 and py-version >= 3.6.

Unnecessary elif after raise, remove the leading el from elif
Open

        if relation in self.explicit_relations and target in self.explicit_relations[relation]:
Severity: Info
Found in mlx/traceability/traceable_item.py by pylint

Used in order to highlight an unnecessary block of code following an if containing a raise statement. As such, it will warn when it encounters an else following a chain of ifs, all of them containing a raise statement.

Starting a process with a partial executable path
Open

    plantuml_path = subprocess.check_output(["where", "/F", "plantuml.jar"])
Severity: Info
Found in doc/conf.py by bandit

Unrecognized option found: files-output, bad-functions, function-name-hint, variable-name-hint, const-name-hint, attr-name-hint, argument-name-hint, class-attribute-name-hint, inlinevar-name-hint, class-name-hint, module-name-hint, method-name-hint, no-space-check
Open

[MASTER]
Severity: Critical
Found in .pylintrc by pylint

Used when we detect an option that we do not recognize.

Too many local variables (20/15)
Open

    def make_internal_item_ref(self, app, item_id):

Used when a function or method has too many local variables.

Formatting a regular string which could be a f-string
Open

            raise TraceabilityException("Item '{identification}' has no reference to source document."

Used when we detect a string that is being formatted with format() or % which could potentially be a f-string. The use of f-strings is preferred. Requires Python 3.6 and py-version >= 3.6.

Formatting a regular string which could be a f-string
Open

                "Item-matrix directive should have the same number of values for the options 'target' and "

Used when we detect a string that is being formatted with format() or % which could potentially be a f-string. The use of f-strings is preferred. Requires Python 3.6 and py-version >= 3.6.

Formatting a regular string which could be a f-string
Open

                "Item-matrix {!r} cannot combine 'targetcolumns' with more than one 'target'; "

Used when we detect a string that is being formatted with format() or % which could potentially be a f-string. The use of f-strings is preferred. Requires Python 3.6 and py-version >= 3.6.

Severity
Category
Status
Source
Language