idoavrah / terraform-tui

Terraform textual UI
https://pypi.org/project/tftui/
Apache License 2.0
998 stars 30 forks source link

Setup styling and liniting pre-commit hooks, add contribution guidelines #6

Closed idanfishman closed 1 year ago

idanfishman commented 1 year ago

This pull request introduces a set of powerful pre-commit hooks to improve code quality and maintain consistency across our project. The following pre-commit hooks have been added:

  1. check-added-large-files: This hook scans for large files that have been added, helping to identify potential performance bottlenecks early in the development process.

  2. end-of-file-fixer: The hook ensures that all files end with an appropriate end-of-file marker, promoting a uniform and neat codebase.

  3. trailing-whitespace: This hook eliminates trailing whitespaces in files, preventing unnecessary distractions and improving code readability.

  4. no-commit-to-branch: With this hook, commits directly to the main and develop branches are disallowed, reinforcing our version control workflow and promoting feature branching.

  5. commitizen: The hook enables commitizen support, encouraging standardized commit messages and facilitating changelog generation.

  6. check-github-workflows: This hook validates the GitHub workflows, ensuring that they are correctly set up and ready for smooth CI/CD integration.

  7. pyupgrade: The hook utilizes pyupgrade to perform Python 3.10+ compatible code refactoring, staying up-to-date with the latest language features.

  8. ruff: With this hook, Ruff ensures codebase consistency by fixing any potential issues automatically.

  9. black: The hook leverages black to automatically format code according to the Python style guide, fostering a consistent and elegant codebase.

In addition to the pre-commit hooks, this pull request also adds comprehensive contribution guidelines to the project. These guidelines empower both new and existing contributors with a clear understanding of our collaboration practices.