STYLE: Adding precommit hook and workflow for checking code quality#302
Closed
STYLE: Adding precommit hook and workflow for checking code quality#302
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This pull request adds automated code quality enforcement by introducing pre-commit hooks and GitHub Actions workflows to check Python and C++ code against linting standards.
Key changes:
- GitHub Actions workflow for automatic linting checks on pull requests with configurable thresholds
- Pre-commit hooks for local linting enforcement before commits
- Configuration files defining linting rules, disabled checks, and error thresholds for both Python (pylint) and C++ (cpplint)
Reviewed Changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
.github/workflows/code-quality-check.yml |
Implements CI workflow to run pylint and cpplint on PRs, report status, and post results as comments |
.pre-commit-config.yml |
Configures pre-commit hooks for pylint and cpplint with specified arguments and file exclusions |
pyproject.toml |
Defines pylint configuration including disabled checks, minimum score threshold of 8.5, and max line length |
cpplint.cfg |
Sets C++ linting rules including line length limit and filtered checks |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
📊 Code Coverage Report
Diff CoverageDiff: main...HEAD, staged and unstaged changesNo lines with coverage information in this diff. 📋 Files Needing Attention📉 Files with overall lowest coverage (click to expand)mssql_python.helpers.py: 67.8%
mssql_python.pybind.ddbc_bindings.cpp: 70.7%
mssql_python.pybind.connection.connection.cpp: 74.4%
mssql_python.pybind.connection.connection_pool.cpp: 78.9%
mssql_python.ddbc_bindings.py: 79.6%
mssql_python.pybind.ddbc_bindings.h: 79.7%
mssql_python.auth.py: 87.1%
mssql_python.pooling.py: 87.7%
mssql_python.__init__.py: 90.9%
mssql_python.exceptions.py: 92.8%🔗 Quick Links
|
sumitmsft
requested changes
Oct 29, 2025
Contributor
sumitmsft
left a comment
There was a problem hiding this comment.
only minor change required. rest all looks good
bewithgaurav
previously approved these changes
Oct 29, 2025
bewithgaurav
approved these changes
Oct 30, 2025
sumitmsft
approved these changes
Oct 30, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Work Item / Issue Reference
Summary
This pull request introduces automated code quality checks for both Python and C++ files, ensuring consistent linting standards across the project. It adds configuration files and workflow automation to enforce linting thresholds, error limits, and style guidelines. The most important changes are grouped below by theme.
Continuous Integration and Workflow Automation:
.github/workflows/code-quality-check.ymlto run linting checks automatically on pull requests for Python and C++ files, including status reporting and PR comments.Linting Configuration:
.pre-commit-config.ymlto enable pre-commit hooks forpylintandcpplint, ensuring code is linted before commits are made.pyproject.tomlconfiguration forpylint, specifying disabled checks, minimum score threshold, and maximum line length.cpplint.cfgto configure C++ linting rules, such as excluding build files, setting line length, and disabling specific readability checks.