Skip to content

Conversation

@RajivBB
Copy link
Collaborator

@RajivBB RajivBB commented Nov 21, 2025

Pre-Commit Workflow and Configuration Update

Description

This pull request introduces improvements to the code quality and consistency through the following changes:

  • GitHub Actions Workflow:
    A new workflow has been added at .github/workflows/pre-commit.yml to automatically run pre-commit checks on pushes and pull requests to the main branch.

  • Python 3.11 and Pre-Commit Installation:
    Installs Python 3.11 and the pre-commit framework.

  • Project-Specific Pre-Commit Configuration:
    Loads the project-specific pre-commit configuration, with a fallback to a global config if none exists.

  • Pre-Commit Hook Execution:
    Runs all pre-commit hooks, captures full logs, and outputs a summary of failed hooks, affected files, and error details.

  • .pre-commit-config.yaml Update:
    Updates the .pre-commit-config.yaml file with the latest hooks and settings to enforce consistent code formatting and quality across the repository.

Motivation

Automating pre-commit checks ensures that all commits and pull requests adhere to the project's code standards. This approach reduces potential errors, improves maintainability, and encourages contributors to follow best practices consistently.

Issue

Fixes #19

@subash-nagarkoti123
Copy link
Collaborator

Goal:
Resolved pre-commit hook errors related to all components in the cluster management repository.

Work Done:

  • Fixed missing docstring errors by adding appropriate docstrings to functions and classes.

  • Resolved import errors by adding the dependencies in the pre-commit config file

  • Addressed Flake8 issues, including line length, unused imports, and formatting inconsistencies.

  • Fixed Pylint issues, including:

  1. too-few-public-methods
  2. no-else-return
  3. raise-missing-from
  4. broad-exception-caught
  5. too-many-locals
  6. too-many-return-statements
  7. line-too-long
  8. import-error

Outcome:

  • All pre-commit hooks now pass successfully.
  • Code is fully compliant with configured linting and formatting rules.
  • Ready for merge without pre-commit failures.

@RajivBB RajivBB linked an issue Dec 1, 2025 that may be closed by this pull request
6 tasks
@RajivBB RajivBB added the enhancement New feature or request label Dec 1, 2025
@mergeable mergeable bot added the validated label Dec 1, 2025
@RajivBB RajivBB force-pushed the feat/rajivbb/workflow branch from 8245238 to 3b91fcf Compare December 9, 2025 04:12
@RajivBB RajivBB closed this Dec 9, 2025
@RajivBB RajivBB deleted the feat/rajivbb/workflow branch December 9, 2025 04:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request validated

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix Pre-Commit Hook Errors Across ClusterManager

3 participants