.pre-commit-config.yaml 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. repos:
  2. - repo: https://github.com/astral-sh/ruff-pre-commit
  3. rev: v0.6.9
  4. hooks:
  5. - id: ruff
  6. name: "Ruff linter"
  7. args: [ netbox/ ]
  8. - repo: local
  9. hooks:
  10. - id: django-check
  11. name: "Django system check"
  12. description: "Run Django's internal check for common problems"
  13. entry: python netbox/manage.py check
  14. language: system
  15. pass_filenames: false
  16. types: [python]
  17. - id: django-makemigrations
  18. name: "Django migrations check"
  19. description: "Check for any missing Django migrations"
  20. entry: python netbox/manage.py makemigrations --check
  21. language: system
  22. pass_filenames: false
  23. types: [python]
  24. - id: mkdocs-build
  25. name: "Build documentation"
  26. description: "Build the documentation with mkdocs"
  27. files: 'docs/'
  28. entry: mkdocs build
  29. language: system
  30. pass_filenames: false
  31. - id: yarn-validate
  32. name: "Yarn validate"
  33. description: "Check UI ESLint, TypeScript, and Prettier compliance"
  34. files: 'netbox/project-static/'
  35. entry: yarn --cwd netbox/project-static validate
  36. language: system
  37. pass_filenames: false
  38. - id: verify-bundles
  39. name: "Verify static asset bundles"
  40. description: "Ensure that any modified static assets have been compiled"
  41. files: 'netbox/project-static/'
  42. entry: scripts/verify-bundles.sh
  43. language: system
  44. pass_filenames: false