Skip to content

Recursive linting stopped working in 1.35.0 #1140

@awcrosby

Description

@awcrosby

System Info

  • OS: Debian GNU/Linux 12 (bookworm)
  • Python Version Python 3.12.9
  • djLint Version djlint, version 1.36.4
  • template language: django template language

Issue

I have been successfully linting all html files in my template dir via:

$ djlint django/api/templates --profile=django --lint
$ djlint django/api/templates --profile=django --check

$ tree django/api/templates/
django/api/templates/
├── workflow_panel
│   ├── workflow_detail.html
│   └── workflow_row.html
├── workflow_start
│   └── start_form.html
└── base.html

In older versions (1.34.1, 1.34.2) this works locally on Ubuntu as well as self-hosted Debian gitlab runners. Starting in 1.35.0 (and 1.36.4) it works only locally but Debian gitlab runners yield:

$ djlint django/api/templates --profile=django --lint
No files to check! 😢
$ djlint django/api/templates --profile=django --check
No files to check! 😢

The following only finds the one base.html file

$ djlint django/api/templates/* --profile=django --lint
Linting 1/1 files ━━━━━━━━━━ 00:00

Other recursive linting works ok like: $ ruff check django/ --diff --unsafe-fixes

How To Reproduce

In this Debian env (I have not tried any others)

  • have a TEMPLATE_DIR with subdirs of html templates
  • Install djlint 1.34.2
  • See this lint successfully: djlint $TEMPLATE_DIR --profile=django --lint
  • Install djlint 1.35.0 or 1.36.4
  • See this find no files: djlint $TEMPLATE_DIR --profile=django --lint

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

None.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions