Skip to content

Add check-only pre-commit style gate with flake8 - #22

Draft
alifa98 with Copilot wants to merge 2 commits into
masterfrom
copilot/add-precommit-configuration
Draft

alifa98 with Copilot wants to merge 2 commits into
masterfrom
copilot/add-precommit-configuration

Conversation

Copilot AI commented Sep 11, 2026 •

Copy link
Copy Markdown

This change introduces a commit-time style checklist via Git pre-commit hooks, aligned with the requirement to fail on style violations without auto-fixing files. It adds a repository-level pre-commit configuration and documents expected developer usage.

  • Pre-commit style gate

    • Added .pre-commit-config.yaml with a flake8 hook pinned to 6.0.0.
    • Hook is configured for reporting/failure behavior only (no formatting or rewrite tools).
  • Developer tooling

    • Added pre-commit==3.8.0 to requirements-dev.txt so contributors can install and use the hook consistently.
  • Contributor documentation

    • Updated README.md with setup commands and explicit behavior: pre-commit reports style issues and does not modify files.
repos:
  - repo: https://github.com/pycqa/flake8
    rev: 6.0.0
    hooks:
      - id: flake8
        args: [--count, --max-complexity=10, --max-line-length=127, --statistics]

Copilot AI linked an issue Sep 11, 2026 that may be closed by this pull request
Copilot AI changed the title [WIP] Add precommit configuration to check code style Add check-only pre-commit style gate with flake8 Sep 11, 2026
Copilot AI requested a review from alifa98 September 11, 2026 01:04

@alifa98 alifa98 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems correct but I might need to add some other pre-commit hooks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

precommit configuration

2 participants