Skip to content

Ability to do simple checks on template tag content #131

Open
@lb-

Description

@lb-

Is your proposal related to a problem?

  • there are some Django template conventions we would like to enforce with a linting rule
  • example: require using trimmed with blocktrans

Describe the solution you’d like

  • template tag requires - a configurable list of regex (might be simplest) that runs inside any template tag usages (in Django those with {% ... %}

Describe alternatives you’ve considered

  • add a custom tool that does a regex parse across all html files within a folder
  • monkey patch the Django template system (or add a custom template order that extends the Django one), when running in test or Dev mode any template tags that do not conform will throw an error

Additional context

Activity

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

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions