ADD pre-commit configuration files
This commit is contained in:
parent
80332957cc
commit
b51ec3655f
12
.clang-format
Normal file
12
.clang-format
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
---
|
||||||
|
BasedOnStyle: Google
|
||||||
|
IndentWidth: 4
|
||||||
|
---
|
||||||
|
Language: Cpp
|
||||||
|
ColumnLimit: 90
|
||||||
|
AlignConsecutiveAssignments: true
|
||||||
|
DerivePointerAlignment: false
|
||||||
|
PointerAlignment: Left
|
||||||
|
BinPackArguments: false
|
||||||
|
BinPackParameters: false
|
||||||
|
IndentAccessModifiers: false
|
24
.pre-commit-config.yaml
Normal file
24
.pre-commit-config.yaml
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
files: ^main.cpp
|
||||||
|
repos:
|
||||||
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||||
|
rev: v4.3.0
|
||||||
|
hooks:
|
||||||
|
- id: check-yaml
|
||||||
|
args: [--allow-multiple-documents]
|
||||||
|
- id: end-of-file-fixer
|
||||||
|
- id: trailing-whitespace
|
||||||
|
- repo: https://github.com/pre-commit/mirrors-clang-format
|
||||||
|
rev: 'v14.0.6'
|
||||||
|
hooks:
|
||||||
|
- id: clang-format
|
||||||
|
- repo: https://github.com/cpplint/cpplint
|
||||||
|
rev: '1.6.1'
|
||||||
|
hooks:
|
||||||
|
- id: cpplint
|
||||||
|
- repo: local
|
||||||
|
hooks:
|
||||||
|
- id: cppcheck
|
||||||
|
name: cppcheck
|
||||||
|
require_serial: true
|
||||||
|
entry: cppcheck --enable=all --suppress=missingInclude:* --inline-suppr -i mbed-os --std=c++14 --error-exitcode=1
|
||||||
|
language: system
|
2
cpplint.cfg
Normal file
2
cpplint.cfg
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
linelength=90
|
||||||
|
filter=-build/include_subdir,-whitespace/indent,-build/namespaces,-build/c++11
|
Loading…
x
Reference in New Issue
Block a user