Unverified 提交 9a981846 authored 作者: José Luis Millán's avatar José Luis Millán 提交者: GitHub

Worker: .clang-tidy fix and cleanup (#1010)

- Comment FormatStile option, not supported by older versions of
  clang-tidy.
- Make check list more readable.
- Improve Build.md
上级 25039048
...@@ -158,7 +158,9 @@ Runs [clang-tidy](http://clang.llvm.org/extra/clang-tidy/) and performs C++ code ...@@ -158,7 +158,9 @@ Runs [clang-tidy](http://clang.llvm.org/extra/clang-tidy/) and performs C++ code
* `make clean` and `make` must have been called first. * `make clean` and `make` must have been called first.
* [PyYAML](https://pyyaml.org/) is required. * [PyYAML](https://pyyaml.org/) is required.
* In OSX install it with `brew install libyaml` and `sudo easy_install-X.Y pyyaml`. - In OSX install it with `brew install libyaml` and `sudo easy_install-X.Y pyyaml`.
`MEDIASOUP_TIDY_CHECKS` environment variable with a comma separated list of checks overrides the checks defined in .clang-tidy file.
### `make fuzzer` ### `make fuzzer`
......
--- ---
Checks: '*,-llvmlibc-*,-boost-use-to-string,-cert-*,-clang-analyzer-osx.*,-clang-analyzer-optin.osx.*,-cppcoreguidelines-pro-bounds-array-to-pointer-decay,-cppcoreguidelines-pro-bounds-constant-array-index,-cppcoreguidelines-pro-bounds-pointer-arithmetic,-cppcoreguidelines-pro-type-vararg,-cppcoreguidelines-pro-type-const-cast,-cppcoreguidelines-pro-type-reinterpret-cast,-cppcoreguidelines-pro-type-static-cast-downcast,-cppcoreguidelines-pro-type-union-access,-cppcoreguidelines-special-member-functions,-google-readability-*,-llvm-include-order,-readability-else-after-return,-readability-implicit-bool-cast,-modernize-pass-by-value,-cppcoreguidelines-no-malloc,-modernize-make-unique,-google-default-arguments,-hicpp-uppercase-literal-suffix,-readability-uppercase-literal-suffix,-hicpp-braces-around-statements,-hicpp-vararg,-hicpp-no-array-decay,-cppcoreguidelines-avoid-c-arrays,-hicpp-avoid-c-arrays,-modernize-avoid-c-arrays,-fuchsia-default-arguments-calls,-readability-implicit-bool-conversion,-modernize-use-trailing-return-type,-cppcoreguidelines-avoid-magic-numbers,-cppcoreguidelines-init-variables,-readability-magic-numbers,-cppcoreguidelines-avoid-goto,-hicpp-avoid-goto,-cppcoreguidelines-owning-memory,-hicpp-special-member-functions,-google-runtime-references,-fuchsia-default-arguments-declarations,-cppcoreguidelines-non-private-member-variables-in-classes,-misc-non-private-member-variables-in-classes,-hicpp-signed-bitwise,-readability-function-cognitive-complexity,-altera*,-readability-identifier-length' Checks: "*,\
-altera*,\
-boost-use-to-string,\
-cert-*,\
-clang-analyzer-optin.osx.*,\
-clang-analyzer-osx.*,\
-cppcoreguidelines-avoid-c-arrays,\
-cppcoreguidelines-avoid-goto,\
-cppcoreguidelines-avoid-magic-numbers,\
-cppcoreguidelines-init-variables,\
-cppcoreguidelines-no-malloc,\
-cppcoreguidelines-non-private-member-variables-in-classes,\
-cppcoreguidelines-owning-memory,\
-cppcoreguidelines-pro-bounds-array-to-pointer-decay,\
-cppcoreguidelines-pro-bounds-constant-array-index,\
-cppcoreguidelines-pro-bounds-pointer-arithmetic,\
-cppcoreguidelines-pro-type-const-cast,\
-cppcoreguidelines-pro-type-reinterpret-cast,\
-cppcoreguidelines-pro-type-static-cast-downcast,\
-cppcoreguidelines-pro-type-union-access,\
-cppcoreguidelines-pro-type-vararg,\
-cppcoreguidelines-special-member-functions,\
-fuchsia-default-arguments-calls,\
-fuchsia-default-arguments-declarations,\
-google-default-arguments,\
-google-readability-*,\
-google-runtime-references,\
-hicpp-avoid-c-arrays,\
-hicpp-avoid-goto,\
-hicpp-braces-around-statements,\
-hicpp-no-array-decay,\
-hicpp-signed-bitwise,\
-hicpp-special-member-functions,\
-hicpp-uppercase-literal-suffix,\
-hicpp-vararg,\
-llvm-include-order,\
-llvmlibc-*,\
-misc-non-private-member-variables-in-classes,\
-modernize-avoid-c-arrays,\
-modernize-make-unique,\
-modernize-pass-by-value,\
-modernize-use-trailing-return-type,\
-readability-else-after-return,\
-readability-function-cognitive-complexity,\
-readability-identifier-length,\
-readability-implicit-bool-cast,\
-readability-implicit-bool-conversion,\
-readability-magic-numbers,\
-readability-uppercase-literal-suffix,\
"
HeaderFilterRegex: '' HeaderFilterRegex: ''
AnalyzeTemporaryDtors: false AnalyzeTemporaryDtors: false
User: mediasoup User: mediasoup
FormatStyle: file
# Old clang-tidy does not support this option which indicates to take the
# format options from .clang-format when applying fixes.
#FormatStyle: file
CheckOptions: CheckOptions:
- key: cppcoreguidelines-pro-bounds-constant-array-index.GslHeader - key: cppcoreguidelines-pro-bounds-constant-array-index.GslHeader
value: '' value: ''
......
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论