pre-commit: json checks
Pre-commit is a python package that helps prevent wrong code getting into a commit. It automates the checking such that small bugs are caught early. It can also be customised!
The website with all the hooks can be found here.
The config file we use in the video is listed below.
# See https://pre-commit.com for more information # See https://pre-commit.com/hooks.html for more hooks repos: - repo: https://github.com/pre-commit/pre-commit-hooks rev: v2.4.0 hooks: - id: trailing-whitespace - id: end-of-file-fixer - id: check-yaml - id: check-added-large-files - id: check-ast - id: check-json
Be sure to run install before you commit.
Feedback? See an issue? Something unclear? Feel free to mention it here.
If you want to be kept up to date, consider signing up for the newsletter.