replicatedhq / dockerfilelint

An opinionated Dockerfile linter.
https://www.fromlatest.io
MIT License
993 stars 83 forks source link

Make dockerfilelint available in pre-commit ecosystem #179

Open ChiefGokhlayeh opened 3 years ago

ChiefGokhlayeh commented 3 years ago

Purpose

This PR adds a pre-commit-hooks.yaml file, which defines the necessary meta-data for this linter to be used in the pre-commit ecosystem.

pre-commit is a python based Git Hook manager, that aims to provide state-of-the art linters for various languages, regardless of what languages said linters are written in.

Testing

This PR can be tested manually from any git repository via:

# currently pointing to my fork
pre-commit try-repo https://github.com/ChiefGokhlayeh/dockerfilelint

Provided of course, pre-commit is installed.

Usage

Users who wish to lint their Dockerfiles with dockerfilelint simply create a pre-commit-config.yaml inside their repository, such as this one:

repos:
  - repo: https://github.com/replicatedhq/dockerfilelint # use https://github.com/ChiefGokhlayeh/dockerfilelint for testing this PR
    rev: master # should be replaced by release tag
    hooks:
      - id: dockerfilelint
CLAassistant commented 3 years ago

CLA assistant check
All committers have signed the CLA.

proinsias commented 2 years ago

@marccampbell – could we get this reviewed and merged?