Skip to content

[FEATURE] Add pre-commit #12

@SeungjaeLim

Description

@SeungjaeLim

Description

The project would benefit from adding a pre-commit configuration to automatically perform checks and tasks before each commit. This can help maintain code quality and consistency throughout the project.

Motivation

Implementing a pre-commit configuration is essential for ensuring that code changes meet the project's quality standards and guidelines. It can help prevent common issues, such as linting errors, formatting inconsistencies, and failing tests, from being committed to the repository. This results in a cleaner and more reliable codebase.

Proposed Solution

  1. Install the pre-commit package using pip or another package manager.
  2. Create a .pre-commit-config.yaml file in the root directory of the project.
  3. Define the hooks you want to run before each commit, such as code formatting (e.g., Black, Prettier), linting (e.g., flake8, pylint), and tests.
  4. Configure the pre-commit hooks according to the project's requirements and guidelines.
  5. Run pre-commit install to set up the pre-commit hooks.
  6. Update the CONTRIBUTING.md file to inform contributors about the pre-commit setup and the checks they need to pass before submitting a pull request.

Additional Context

Integrating a pre-commit configuration streamlines the development process by ensuring that code changes are consistently formatted and checked before they are committed to the repository. This helps maintain a high level of code quality and reduces the time spent on code reviews and bug fixes.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions