项目作者: editorconfig-checker

项目描述 :
A tool to verify that your files are in harmony with your .editorconfig
高级语言: Python
项目地址: git://github.com/editorconfig-checker/editorconfig-checker.python.git
创建时间: 2019-08-28T11:07:46Z
项目社区:https://github.com/editorconfig-checker/editorconfig-checker.python

开源协议:MIT License

下载


editorconfig-checker.python


PyPI Latest Release
Downloads
MIT License

A Python wrapper to provide a pip-installable editorconfig-checker binary.

Internally, this package provides a convenient way to download the pre-built editorconfig-checker binary for your particular platform.

Installation

  • From source code:
    1. pip install .
  • From PyPI:
    1. pip install editorconfig-checker

Usage

After installation, the ec binary should be available in your environment (or ec.exe on Windows):

  1. ec -version

Usage with the pre-commit git hooks framework

editorconfig-checker can be included as a hook for pre-commit.
The easiest way to get started is to add this configuration to your .pre-commit-config.yaml:

  1. repos:
  2. - repo: https://github.com/editorconfig-checker/editorconfig-checker.python
  3. rev: '' # pick a git hash / tag to point to
  4. hooks:
  5. - id: editorconfig-checker
  6. alias: ec

The above hook is a python wrapper that automatically downloads and installs
editorconfig-checker binary.
If you manage your tools in some other way, for example, via ASDF,
you may want to use an alternative pre-commit hook that assumes that
ec binary executable is already available on the system path:

  1. repos:
  2. - repo: https://github.com/editorconfig-checker/editorconfig-checker.python
  3. rev: '' # pick a git hash / tag to point to
  4. hooks:
  5. - id: editorconfig-checker-system
  6. alias: ec

See the pre-commit docs to check how to customize this configuration.