Skip to content

Use curlylint for checking Jinja2 templates?Β #12149

@hoechenberger

Description

@hoechenberger

I just discovered curlylint and tested it out:

❯ curlylint mne/html_templates/repr
mne/html_templates/repr/evoked.html.jinja
15:6    Parse error: expected 'table' at 15:6   parse_error

Oh no! πŸ’₯ πŸ’” πŸ’₯
1 error reported

The error is legit, there's something wrong in this line.

I also ran it on the #12145 branch and I'm also seeing some I believe legit errors there.

curlylint can also be used as a pre-commit hook: https://www.curlylint.org/docs/reference/integrations#usage-with-pre-commit-git-hooks-framework

We cannot use it for the "partial" templates like the TOC, header, and footer; but for the repr templates, it should be a suitable tool

cc @larsoner

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions