Skip to content

Instantly share code, notes, and snippets.

@nx10
Created December 5, 2023 19:06
Show Gist options
  • Save nx10/62736f785f2748f030c4ed110fbd2f25 to your computer and use it in GitHub Desktop.
Save nx10/62736f785f2748f030c4ed110fbd2f25 to your computer and use it in GitHub Desktop.
[pre-commit hook] Prefer YAML file extension .yaml over .yml
- repo: local
hooks:
- id: yaml-file-extension
name: Prefer .yaml over .yml.
entry: YAML files must have .yaml extension.
language: fail
files: \.yml$
@nx10
Copy link
Author

nx10 commented Dec 5, 2023

This is all you need. Will just check if there are any files ending in .yml and fail.

References:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment