Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] [Linter] H026 false positive #1075

Open
OliverGBH opened this issue Dec 18, 2024 · 0 comments
Open

[BUG] [Linter] H026 false positive #1075

OliverGBH opened this issue Dec 18, 2024 · 0 comments
Labels
🔍 linter 🦠 bug Something isn't working

Comments

@OliverGBH
Copy link

I've:

System Info

  • OS: ubuntu 22.04
  • Python Version 3.12
  • djLint Version v1.35.2
  • template language: Jinja

Issue

False positive on H026 ruling when linting -- happens when "id" is part of a tag property.

How To Reproduce

With the following the rule procs:
<input type="number" name="account_id" placeholder="enter account ID here" />

despite having no class or id tag - removing ID and account_ud fixes the issue linter, but I need those values for those tags.

Contents of djlint.toml/.djlintrc/pyproject.toml [tool.djlint]

It is to be said I am using pre-commit hooks, whose configuration is as thus:

{
  "indent": 2,
  "ignore": "H030,H031",
  "profile": "jinja"
}

with pre-commit hook as thus:

- repo: https://github.com/djlint/djLint
  rev: v1.35.2
  hooks:
  - id: djlint-reformat-jinja
  - id: djlint-jinja

Notes

I saw a similar issue here, but it was fixed, I think this might be a related issue: #711

@OliverGBH OliverGBH added 🔍 linter 🦠 bug Something isn't working labels Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔍 linter 🦠 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant