Coder Social home page Coder Social logo

cmake-format-precommit's People

Contributors

cheshirekow avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

cmake-format-precommit's Issues

Optional PyYAML dependence?

When one wants to use configuration files in the YAML format, cmake-format and cmake-lint require pyyaml (ref. cmake-format: Configuration).

In the pre-commit framework, users can overwrite additional_dependencies in their .pre-commit-config.yaml to work with YAML configuration files:

repos:
-   repo: https://github.com/cheshirekow/cmake-format-precommit
    rev: v0.6.5
    hooks:
    -   id: cmake-format
        additional_dependencies: [cmake-format==0.6.5, pyyaml==5.3]
    -   id: cmake-lint
        additional_dependencies: [cmake-format==0.6.5, pyyaml==5.3]

but, as you see, one has to write the version number 0.6.5 3 times in this case. This doesn't look cool.

I come up with the following 2 options to improve the above point:

  1. Always install pyyaml to the (isolated) pre-commit environment anyway. So, set additional_dependencies: [cmake-format==0.6.5, pyyaml==5.3] in .pre-commit-hooks.yaml.

  2. Install cmake-format by the install_requires option of the setup and leave additional_dependencies in .pre-commit-hooks.yaml blank by default. (See mirrors-mypy as an example.) Then users can optionally add additional_dependencies: [pyyaml==5.3] in their .pre-commit-config.yaml.

[bug] Missing v0.6.11 release.

Is it possible to combine this repo with the cmake-format one? I know at least Black does it all in one repo (see https://black.readthedocs.io/en/stable/version_control_integration.html). They are sadly out of sync - I copied and pasted from here: https://cmake-format.readthedocs.io/en/latest/installation.html#pre-commit :

repo: https://github.com/cheshirekow/cmake-format-precommit
rev: v0.6.11
hooks:
- id: cmake-format

And got an error about v0.6.11 not existing, since there's no release here.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.