Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Activation des hooks de pre-commit ? #14

Open
loicguillois opened this issue May 25, 2022 · 0 comments
Open

Activation des hooks de pre-commit ? #14

loicguillois opened this issue May 25, 2022 · 0 comments

Comments

@loicguillois
Copy link

loicguillois commented May 25, 2022

Est-ce que l'on utilise les pre-commit-hook et/ou configuration de l'éditeur ?

.pre-commit-config.yaml

# 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: v4.2.0
    hooks:
      - id: trailing-whitespace
      - id: check-executables-have-shebangs
      - id: check-shebang-scripts-are-executable
      - id: check-merge-conflict
      - id: check-symlinks
      - id: check-vcs-permalinks
      - id: detect-private-key
      - id: check-added-large-files
  - repo: https://github.com/ambv/black
    rev: 22.3.0
    hooks:
      - id: black
        language_version: python3.10
  - repo: https://github.com/rtts/djhtml
    rev: v1.5.0
    hooks:
      - id: djhtml
  - repo: https://github.com/pre-commit/mirrors-mypy
    rev: "v0.950"
    hooks:
      - id: mypy
  - repo: local
    hooks:
      - id: pylint
        name: PyLint
        entry: pylint PDFGenerator
        language: system
        types: [python]
        pass_filenames: false
  - repo: local
    hooks:
      - id: django-test
        name: django-test
        entry: bash -c 'cd PDFGenerator/http && python manage.py test'
        always_run: true
        pass_filenames: false
        language: system

Mettre à jour le README.md:

## hook de pre-commit
  
Nous utilisons les hooks de pre-commit définit dans le ficher [.pre-commit-config.yaml](.pre-commit-config.yaml):
* pre-commit-hooks > trailing-whitespace
* pre-commit-hooks > check-added-large-files
* black
* djhtml
* pylint
* mypy
* django tests
  
Installer les hooks de pre-commit avec la commande

    ```sh
    pre-commit install
    ```
@JulieMoncorger JulieMoncorger transferred this issue from another repository Feb 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Todo
Development

No branches or pull requests

1 participant