ComplianceAsCode/content

View on GitHub
ssg/templates.py

Summary

Maintainability
A
B
+4 hrs
Test Coverage

File templates.py has 490 lines of code (exceeds 400 allowed). Consider refactoring.
New

"""
Common functions for processing Templates in SSG
"""

from __future__ import absolute_import
Severity: Minor
Found in ssg/templates.py - About 4 hrs to fix

    Line too long (102 > 99 characters)
    New

            Processes a template for a given template name and language, and returns the rendered content.
    Severity: Minor
    Found in ssg/templates.py by pep8

    Limit all lines to a maximum of 79 characters.

    There are still many devices around that are limited to 80 character
    lines; plus, limiting windows to 80 characters makes it possible to
    have several windows side-by-side.  The default wrapping on such
    devices looks ugly.  Therefore, please limit all lines to a maximum
    of 79 characters. For flowing long blocks of text (docstrings or
    comments), limiting the length to 72 characters is recommended.
    
    Reports error E501.

    Line too long (117 > 99 characters)
    New

            1. Identifies languages affecting the platform by examining the symbols associated with the platform's tests.
    Severity: Minor
    Found in ssg/templates.py by pep8

    Limit all lines to a maximum of 79 characters.

    There are still many devices around that are limited to 80 character
    lines; plus, limiting windows to 80 characters makes it possible to
    have several windows side-by-side.  The default wrapping on such
    devices looks ugly.  Therefore, please limit all lines to a maximum
    of 79 characters. For flowing long blocks of text (docstrings or
    comments), limiting the length to 72 characters is recommended.
    
    Reports error E501.

    Line too long (116 > 99 characters)
    New

            2. For each CPE that is templated, it builds the CPE and determines the languages that need to be generated.
    Severity: Minor
    Found in ssg/templates.py by pep8

    Limit all lines to a maximum of 79 characters.

    There are still many devices around that are limited to 80 character
    lines; plus, limiting windows to 80 characters makes it possible to
    have several windows side-by-side.  The default wrapping on such
    devices looks ugly.  Therefore, please limit all lines to a maximum
    of 79 characters. For flowing long blocks of text (docstrings or
    comments), limiting the length to 72 characters is recommended.
    
    Reports error E501.

    Line too long (103 > 99 characters)
    New

                FileNotFoundError: If the "extra_ovals.yml" file does not exist in the templates directory.
    Severity: Minor
    Found in ssg/templates.py by pep8

    Limit all lines to a maximum of 79 characters.

    There are still many devices around that are limited to 80 character
    lines; plus, limiting windows to 80 characters makes it possible to
    have several windows side-by-side.  The default wrapping on such
    devices looks ugly.  Therefore, please limit all lines to a maximum
    of 79 characters. For flowing long blocks of text (docstrings or
    comments), limiting the length to 72 characters is recommended.
    
    Reports error E501.

    There are no issues that match your filters.

    Category
    Status