Skip to content

Conversation

Pierre-Sassoulas
Copy link

Would have helped me to jump start instead of doing my own local hook. Chose to do a format then a check because sometime one autoformat is not enough, and the checks were not all done on format AFAIU.

Copy link

netlify bot commented Jan 24, 2025

Deploy Preview for djlint canceled.

Name Link
🔨 Latest commit 95b386d
🔍 Latest deploy log https://app.netlify.com/sites/djlint/deploys/6793fdc2b0b4a20008a0f5d0

@monosans monosans requested a review from Copilot July 29, 2025 13:31
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds documentation for using djLint with pre-commit hooks to the README. It provides a copy-pastable YAML configuration that users can add to their .pre-commit-config.yaml file to automatically format and check their templates.

  • Adds a pre-commit configuration example with two hooks: one for reformatting and one for checking
  • Includes helpful comments explaining version usage and where to find additional hook IDs
Comments suppressed due to low confidence (1)

README.md:88

  • The version v1.36.4 may not exist or may be outdated. Consider using a more recent version or a placeholder like 'vX.Y.Z' to indicate users should check for the latest version.
    rev: v1.36.4  # use latest version instead

hooks:
- id: djlint # For an exhaustive list check 'id' in the project's '.pre-commit-hooks.yaml'
args: ["--reformat"]
- id: djlint
Copy link
Preview

Copilot AI Jul 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The second djlint hook is missing the args parameter. Since this hook is intended for checking (as mentioned in the description), it should include appropriate arguments or a comment explaining its purpose.

Suggested change
- id: djlint
- id: djlint
args: ["--check"]

Copilot uses AI. Check for mistakes.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would make sense to be explicit, it's the default value.

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

Successfully merging this pull request may close these issues.

1 participant