Pre-commit Hooks
Have all checks run:
repos:
- repo: https://github.com/mto79/pre-commit-hooks.git
rev: v1.0.0
hooks:
- id: ansible_role_find_empty_files
- id: ansible_role_find_empty_directoriesYou can also select single checks, read futher for more details.
This hook can find empty defaults/main.yml, handlers/main.yml and vars/main.yml files.
repos:
- repo: https://github.com/mto79/pre-commit-hooks.git
rev: v1.0.0
hooks:
- id: ansible_role_find_empty_filesExtra parameter available:
-l <number>: number of minimum lines to declare that a file is empty (by default: 2)
This hook can find empty directories.
repos:
- repo: https://github.com/mto79/pre-commit-hooks.git
rev: v1.0.0
hooks:
- id: ansible_role_find_empty_directoryExtra parameter available:
-d <number>: number of sub folder (maxdepth) to check (by default: 1)