Skip to content

Commit

Permalink
⚗️ Add clang-tidy configuration and his task in Taskfile named 'norm'
Browse files Browse the repository at this point in the history
This commit add only clang-tidy configuration and a task no CI/CD implementation
  • Loading branch information
Unam3dd committed Jun 13, 2024
1 parent 50be9e8 commit a8edd04
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .clang-tidy
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
Checks: 'readability-function-size, readability-math-missing-parentheses, readability-duplicate-include'
WarningsAsErrors: '.*'
HeaderFileExtensions: ['h']
ImplementationFileExtensions: ['c']
HeaderFilterRegex: 'inc/.*\\.h$'

CheckOptions:
- key: readability-function-size.LineThreshold
value: '25'
- key: readability-function-size.ParameterThreshold
value: '5'
7 changes: 7 additions & 0 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,13 @@ tasks:
silent: true
desc: "Build the project in release build in stripped mode"

norm:
preconditions:
- sh: '{{if eq OS "windows"}} powershell.exe -Command Test-Path build {{else}} test -d build {{end}}'
msg: "Norm required compile_commands.json files please build the project before !"
cmds:
- clang-tidy -p ./build src/**/*.c

build-dev:
preconditions:
- sh: '{{if eq OS "windows"}} powershell.exe -Command Test-Path dist {{else}} test ! -d dist {{end}}'
Expand Down

0 comments on commit a8edd04

Please sign in to comment.