hanchenye-llvm-project/clang-tools-extra/docs
Roman Lebedev 4d37af003f [clang-tidy] readability-function-size: add VariableThreshold param.
Summary:
Pretty straight-forward, just count all the variable declarations in the function's body, and if more than the configured threshold - do complain.

Note that this continues perverse practice of disabling the new option by default.
I'm not certain where is the balance point between not being too noisy, and actually enforcing the good practice.
If we really want to not disable this by default, but also to not cause too many new warnings, we could default to 50 or so.
But that is a lot of variables too...

I was able to find one coding style referencing variable count:
  - https://www.kernel.org/doc/html/v4.15/process/coding-style.html#functions

    > Another measure of the function is the number of local variables. They shouldn’t exceed 5-10, or you’re doing something wrong.

Reviewers: hokein, xazax.hun, JonasToth, aaron.ballman, alexfh

Reviewed By: aaron.ballman

Subscribers: kimgr, Eugene.Zelenko, rnkovacs, cfe-commits

Tags: #clang-tools-extra

Differential Revision: https://reviews.llvm.org/D44602

llvm-svn: 329902
2018-04-12 12:06:42 +00:00
..
clang-tidy [clang-tidy] readability-function-size: add VariableThreshold param. 2018-04-12 12:06:42 +00:00
CMakeLists.txt docs: Fix Sphinx detection with out-of-tree builds 2017-05-09 11:11:52 +00:00
Doxyfile
ModularizeUsage.rst
README.txt
ReleaseNotes.rst [clang-tidy] readability-function-size: add VariableThreshold param. 2018-04-12 12:06:42 +00:00
clang-doc.rst [docs] Adding clang-doc to CTE toctree to fix docs build error 2018-03-12 21:39:01 +00:00
clang-modernize.rst
clang-rename.rst clang-rename: add new -force option 2017-06-02 09:32:28 +00:00
clang-tidy.rst
clangd.rst [clangd] Mark "Source Hover" as implemented in the docs 2018-03-29 14:49:21 +00:00
conf.py Docs, release notes: update version to 7.0.0 2018-01-03 15:53:24 +00:00
cpp11-migrate.rst
doxygen-mainpage.dox
doxygen.cfg.in
include-fixer.rst
index.rst [docs] Adding clang-doc to CTE toctree to fix docs build error 2018-03-12 21:39:01 +00:00
make.bat
modularize.rst Fix more inconsistent line endings. NFC. 2017-12-18 19:46:56 +00:00
pp-trace.rst Fix more inconsistent line endings. NFC. 2017-12-18 19:46:56 +00:00

README.txt

-------------------------------------------------------------
Documentation for the tools of clang-tools-extra repo project
-------------------------------------------------------------

Sphinx and doxygen documentation is generated by executing make.

Sphinx html files can be generated separately using make html.

Doxygen html files can also be generated using make doxygen.

The generated documentation will be placed in _build/html.