Kaszanas / SC2_Datasets

https://sc2-datasets.readthedocs.io/
GNU General Public License v3.0
8 stars 3 forks source link

Pre-commit checks (Linting, code style, other checks) #39

Open Kaszanas opened 7 months ago

Kaszanas commented 7 months ago

Overall it would be nice to have some pre-commit checks with formatting and linting applied for anyone that wishes to contribute to this repository.

Example configuration:

repos:
  - repo: https://github.com/pre-commit/pre-commit-hooks
    rev: v4.4.0
    hooks:
      - id: trailing-whitespace
      - id: end-of-file-fixer
      - id: check-merge-conflict
      - id: check-yaml
        args: [ --unsafe ]
  - repo: https://github.com/psf/black
    rev: 23.3.0
    hooks:
      - id: black
        language_version: python3.10
  - repo: https://github.com/pycqa/flake8
    rev: '6.1.0'
    hooks:
      - id: flake8
exclude: |
    (?x)(
        ^output/|
        ^fonts/|
        ^charts/|
        ^old/
    )

It might be good to use ruff for linting.

Kaszanas commented 7 months ago

This is currently available on dev and was introduced to the GitHub CI action.