Skip to content

Commit

Permalink
feat: clang-tidy code style action
Browse files Browse the repository at this point in the history
  • Loading branch information
3Hren committed Jan 14, 2025
1 parent c04c6d4 commit 240b18e
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .clang-tidy
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
Checks: "-*,readability-identifier-naming"
CheckOptions:
readability-identifier-naming.ConstantCase: lower_case
readability-identifier-naming.ConstantParameterCase: lower_case
readability-identifier-naming.ConstantPointerParameterCase: lower_case
readability-identifier-naming.EnumCase: lower_case
readability-identifier-naming.EnumConstantCase: lower_case
readability-identifier-naming.FunctionCase: lower_case
readability-identifier-naming.GlobalConstantCase: lower_case
readability-identifier-naming.GlobalConstantPointerCase: lower_case
readability-identifier-naming.GlobalFunctionCase: lower_case
readability-identifier-naming.GlobalPointerCase: lower_case
readability-identifier-naming.GlobalVariableCase: lower_case
readability-identifier-naming.LocalConstantCase: lower_case
readability-identifier-naming.LocalConstantPointerCase: lower_case
readability-identifier-naming.LocalPointerCase: lower_case
readability-identifier-naming.LocalVariableCase: lower_case
readability-identifier-naming.ParameterCase: lower_case
readability-identifier-naming.ParameterPackCase: lower_case
readability-identifier-naming.PointerParameterCase: lower_case
readability-identifier-naming.StaticConstantCase: lower_case
readability-identifier-naming.StaticVariableCase: lower_case
readability-identifier-naming.StructCase: lower_case
readability-identifier-naming.TypedefCase: lower_case
readability-identifier-naming.UnionCase: lower_case
readability-identifier-naming.VariableCase: lower_case
#
readability-braces-around-statements: true
31 changes: 31 additions & 0 deletions .github/workflows/check-style.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Code style check

on:
push:
branches: ["main"]
paths: ["**.h", "**.c"]
pull_request:
branches: ["main"]
paths: ["**.h", "**.c"]


jobs:
cpp-linter:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: cpp-linter/cpp-linter-action@main
id: linter
continue-on-error: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
style: file
# Use .clang-tidy config file.
tidy-checks: ''
version: 19
thread-comments: false
step-summary: true
tidy-review: false
format-review: false

0 comments on commit 240b18e

Please sign in to comment.