Conversation
There was a problem hiding this comment.
Pull request overview
This pull request adds CI workflows for code style checking in a C++ test repository. It modernizes the pre-commit configuration by replacing pylint-based Python checks with Ruff, updates C++ formatting tools, and introduces GitHub Actions workflows for automated code style validation with bypass capabilities for CI team members.
Changes:
- Removed Python-specific pylint hook and replaced with Ruff for Python code style checking
- Added new shell scripts for cpplint and clang-format with version management
- Introduced GitHub Actions workflows for automated codestyle checks with a bypass mechanism
- Added EditorConfig file for consistent editor settings across the team
Reviewed changes
Copilot reviewed 6 out of 10 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tools/codestyle/pylint_pre_commit.hook | Deleted obsolete pylint pre-commit hook for Python docstring checking |
| tools/codestyle/cpplint_pre_commit.sh | New script to manage cpplint version and execution |
| tools/codestyle/clang_format.sh | New script to manage clang-format version with Python version check |
| coverage/rename_func.py | Reordered imports and added noqa comment for bare except clause |
| .pre-commit-config.yaml | Comprehensive update replacing pylint/black/flake8 with Ruff, updating hook references, and adding yamlfmt |
| .github/workflows/codestyle-check.yml | New workflow for running pre-commit checks on pull requests using prek |
| .github/workflows/check-bypass.yml | New reusable workflow for allowing CI team members to bypass checks |
| .editorconfig | New EditorConfig file defining consistent editor settings for various file types |
| .clang-format | Minor formatting fix removing trailing whitespace from comments |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| entry: bash ./tools/codestyle/cpplint_pre_commit.sh | ||
| language: system | ||
| files: \.(c|cc|cxx|cpp|cu|h|hpp|hxx|scpp)$ | ||
| files: \.(cc|cxx|cpp|cu|h|hpp|hxx)$ |
There was a problem hiding this comment.
There's an inconsistency in file patterns between clang-format and cpplint. The clang-format hook (line 41) includes '.c' and '.kps' files in its pattern, but cpplint (line 49) excludes them. Additionally, cpplint's extension arguments (line 51) include 'kps' but the file pattern doesn't match '.kps' files. Consider aligning these patterns to ensure consistent code style checking.
| files: \.(cc|cxx|cpp|cu|h|hpp|hxx)$ | |
| files: \.(c|cc|cxx|cpp|cu|cuh|h|hpp|hxx|kps)$ |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
No description provided.