Skip to content

Conversation

Copy link
Contributor

Copilot AI commented May 28, 2025

This PR adds a pre-commit hook configuration to automatically run black code formatter before each commit. This helps ensure that any changes submitted will pass the black PR validation check, as mentioned in the issue.

Changes include:

  • Added pre-commit as a development dependency in pyproject.toml
  • Created .pre-commit-config.yaml to run black on the sarif directory
  • Updated CONTRIBUTING.md with instructions for setting up and using pre-commit hooks

With this change, developers will automatically have their Python code formatted according to the project's standards before committing, reducing the need for formatting-related PR revisions.

How to use

After pulling this change, run:

poetry install
poetry run pre-commit install

The hook will then automatically run on each commit, formatting the code according to black's rules.

Fixes #94.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 4 commits May 28, 2025 18:16
Co-authored-by: debonte <12820898+debonte@users.noreply.github.com>
Co-authored-by: debonte <12820898+debonte@users.noreply.github.com>
Copilot AI changed the title [WIP] Add a precommit hook to run black Add pre-commit hook to run black May 28, 2025
Copilot AI requested a review from debonte May 28, 2025 18:19
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.

Add a precommit hook to run black

2 participants