Skip to Content

Contributors

pre-commit help

I'm having trouble with pre-commit. Can someone give me a few tips?

I tried to follow the instructions in the README for maintainer-tools:


I installed maintainer-tools and activated the venv, then ran the following

.../repo/module$ pre-commit run --all-files --show-diff-on-failure --color=always

Still failing the pre-commit test on pull request.

Maybe there is more documentation that I am missing?

Matt


by Matt - 11:00 - 14 Aug 2024

Follow-Ups

  • Re: pre-commit help
    Not all the errors that precommit gives are automatically solved, some you have to solve them manually.

    Usually the precommit log as displayed on the PR is pretty clear about what the problem is.

    14 aug. 2024 23:01:57 Matt Taylor <notifications@odoo-community.org>:

    I'm having trouble with pre-commit. Can someone give me a few tips?

    I tried to follow the instructions in the README for maintainer-tools:


    I installed maintainer-tools and activated the venv, then ran the following

    .../repo/module$ pre-commit run --all-files --show-diff-on-failure --color=always

    Still failing the pre-commit test on pull request.

    Maybe there is more documentation that I am missing?

    Matt

    _______________________________________________
    Mailing-List: https://odoo-community.org/groups/contributors-15
    Post to: mailto:contributors@odoo-community.org
    Unsubscribe: https://odoo-community.org/groups?unsubscribe


    by Tom Blauwendraat - 08:31 - 15 Aug 2024
  • Re: pre-commit help
    To run pre-commit, you first need to install it:
    $ pip install pre-commit

    And then in (each) cloned repo, install the pre-commit hooks with:
    $ pre-commit install

    Now you can run :
    $ pre-commit run -a

    At least that's what works for me.

    --Daniel
     

    On 14/08/2024 22:01, Matt Taylor wrote:
    I'm having trouble with pre-commit. Can someone give me a few tips?

    I tried to follow the instructions in the README for maintainer-tools:


    I installed maintainer-tools and activated the venv, then ran the following

    .../repo/module$ pre-commit run --all-files --show-diff-on-failure --color=always

    Still failing the pre-commit test on pull request.

    Maybe there is more documentation that I am missing?

    Matt

    _______________________________________________
    Mailing-List: https://odoo-community.org/groups/contributors-15
    Post to: mailto:contributors@odoo-community.org
    Unsubscribe: https://odoo-community.org/groups?unsubscribe


    --
    DANIEL REIS
    MANAGING PARTNER

    Meet with me.
    M: +351 919 991 307
    E: dreis@OpenSourceIntegrators.com
    A: Avenida da República 3000, Estoril Office Center, 2649-517 Cascais

    [Logo OpenSourceIntegrators.com]


    by Daniel Reis - 11:22 - 14 Aug 2024