Skip to content

[CI] Add codestyle check workflow#20

Merged
BingooYang merged 10 commits intomasterfrom
ci/add-workflows
Jan 12, 2026
Merged

[CI] Add codestyle check workflow#20
BingooYang merged 10 commits intomasterfrom
ci/add-workflows

Conversation

@SigureMo
Copy link
Contributor

No description provided.

Copilot AI review requested due to automatic review settings January 11, 2026 10:05
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)$
Copy link

Copilot AI Jan 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
files: \.(cc|cxx|cpp|cu|h|hpp|hxx)$
files: \.(c|cc|cxx|cpp|cu|cuh|h|hpp|hxx|kps)$

Copilot uses AI. Check for mistakes.
@SigureMo SigureMo changed the title [CI] Add CI workflows on Cpp test repo [CI] Add codestyle workflow Jan 11, 2026
@SigureMo SigureMo changed the title [CI] Add codestyle workflow [CI] Add codestyle check workflow Jan 11, 2026
@BingooYang BingooYang merged commit 6e7d15d into master Jan 12, 2026
2 checks passed
@SigureMo SigureMo deleted the ci/add-workflows branch January 12, 2026 02:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants