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

[FEATURE] Exit with non-zero code if no files formatted/linted #1112

Open
2 tasks done
ziima opened this issue Jan 21, 2025 · 0 comments
Open
2 tasks done

[FEATURE] Exit with non-zero code if no files formatted/linted #1112

ziima opened this issue Jan 21, 2025 · 0 comments

Comments

@ziima
Copy link

ziima commented Jan 21, 2025

Feature Request

I recently discovered djlint stopped linting and checking format of templates in our CI. (I can't reproduce that anywhere else)
The problem I noticed is that djlint complains about checking no files, but it still exits with 0 exit code. That allowed underlying issue to be silently hidden for months.

I suggest djlint to return non-zero exit code if no files were checked, alternatively triggered by an option.

Usecases:

# Should exit with non-zero code, if no HTML files found in `jinja_templates`
djlint --check jinja_templates/
djlint --lint jinja_templates/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant