Customize clang-format coding styles based on Mozilla template (#770)
Customize clang-format coding styles for C source files based on Mozilla template.
To check whether the C source codes are well formatted:
``` bash
$ cd ${wamr-root}
$ clang-format --Werror --dry-run --style=file path/to/file
```
To format the C source codes in place
``` bash
$ cd ${wamr_root}
$ clang-format -i --style=file path/to/file
```
Signed-off-by: Wenyong Huang <wenyong.huang@intel.com>
This commit is contained in:
16
.clang-tidy
Normal file
16
.clang-tidy
Normal file
@ -0,0 +1,16 @@
|
||||
# refer to https://clang.llvm.org/extra/clang-tidy/checks/list.html
|
||||
|
||||
Checks: '-*, readability-identifier-naming, clang-analyzer-core.*,'
|
||||
WarningsAsErrors: '-*'
|
||||
HeaderFilterRegex: ''
|
||||
FormatStyle: file
|
||||
InheritParentConfig: false
|
||||
AnalyzeTemporaryDtors: false
|
||||
User: wamr
|
||||
CheckOptions:
|
||||
- key: readability-identifier-naming.VariableCase
|
||||
value: lower_case
|
||||
- key: readability-identifier-naming.ParameterCase
|
||||
value: lower_case
|
||||
- key: readability-identifier-naming.MacroDefinitionCase
|
||||
value: UPPER_CASE
|
||||
Reference in New Issue
Block a user