Skip to content

Use curlylint for checking Jinja2 templates?Β #12149

Closed

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

Activity

  1. added this to the 1.6 milestone on Oct 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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