Skip to content

flake8 as formatting checker #6

@siaarzh

Description

@siaarzh

Idea

Perhaps it would be good to include a formatting/coding style checker in our CI/CD too. As an example we could follow what cookiecutter-django does:

@pytest.mark.flake8
def test_flake8_passes(cookies, context_combination):
    """
    Generated project should pass flake8.

    This is parametrized for each combination from ``context_combination`` fixture
    """
    result = cookies.bake(extra_context=context_combination)


    try:
        sh.flake8(str(result.project))
    except sh.ErrorReturnCode as e:
        pytest.fail(e)

A decent candidate would be flake8. Here's a short blog post on how to use it. What do you think @elessarelfstone ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions