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(T001): false positive if set multiline variable after tab #350

Closed
3 tasks done
Kristinita opened this issue Aug 24, 2022 · 2 comments · Fixed by #352
Closed
3 tasks done

bug(T001): false positive if set multiline variable after tab #350

Kristinita opened this issue Aug 24, 2022 · 2 comments · Fixed by #352
Labels

Comments

@Kristinita
Copy link

Kristinita commented Aug 24, 2022

1. Summary

I get T001 false positive if I set multiline variable after tab (tabulation symbol).

2. MCVE

2.1. File to check

  • KiraDJLint__set-multiline-variable-after-tab--T001.html

     {# [INFO] MCVE #}
     	{% set kiralist = [
     			"KiraFirstItem",
     			"KiraSecondItem"
     		]
     	%}
    
    
     {# [INFO] Real example #}
     <div class="KiraSlider">
    
     	{% set kira_404_icons_list = [
     			("SashaNose", "1"),
     			("SashaRiver", "2"),
     			("SashaBlueHairs", "3"),
     			("SashaBow", "4"),
     			("SashaPigeon", "5"),
     			("SashaShimskyNovgorodDestrict", "6"),
     			("SashaWeddingOfFriends", "7")
     		]
     	%}
    
     </div>
    

2.2. Desired behavior

No errors

2.3. Current behavior

D:\SashaDebugging\KiraDJLintDebuging>djlint --profile=jinja --lint KiraDJLint__set-multiline-variable-after-tab--T001.html

Linting 1/1 files ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 00:00


SashaDebugging\KiraDJLintDebuging\KiraDJLint__set-list-variable-after-tab--T001.html
───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── T001 5:3 Variables should be wrapped in a single whitespace. %}
T001 20:3 Variables should be wrapped in a single whitespace. %}

Linted 1 file, found 2 errors.

3. Environment

  1. Microsoft Windows [Version 10.0.19041.1415]
  2. Python 3.10.6
  3. djlint, version 1.11.1
  4. Template language — Jinja

4. Checkbox

  1. I’m on the latest version of djLint
  2. I’ve searched the issues
  3. I’ve read the docs

Thanks.

christopherpickering pushed a commit that referenced this issue Aug 24, 2022
# [1.12.0](v1.11.1...v1.12.0) (2022-08-24)

### Bug Fixes

* **h006:** prevented false positives on H006 ([215bd23](215bd23)), closes [#344](#344) [#333](#333)
* **h012:** prevent H012 from matching the contents of tags or attributes ([4480cff](4480cff)), closes [#348](#348)
* **t001:** fixed false positive on multiline template tags ([ea76672](ea76672)), closes [#350](#350)

### Features

* **h021:** allow inline styles that contain template syntax ([f1a39ed](f1a39ed)), closes [#351](#351)
* **t002:** allow variables names to be used in the {% extends tag ([a5d96e7](a5d96e7)), closes [#349](#349)
@christopherpickering
Copy link
Contributor

🎉 This issue has been resolved in version 1.12.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@Kristinita
Copy link
Author

Status: FIXED ✔️ for me for djLint 1.12.0.

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants