From: Aaron Ballman Date: Mon, 27 Jul 2015 13:41:30 +0000 (+0000) Subject: Updating the documentation for clang-tidy. Removes some non-ASCII characters from... X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5a4892b4faa6307aba79d15fee725bb8cc019e02;p=platform%2Fupstream%2Fllvm.git Updating the documentation for clang-tidy. Removes some non-ASCII characters from the documentation, and removes shell-specific single quote characters as they cause issues for some shells (such as on Windows). llvm-svn: 243266 --- diff --git a/clang-tools-extra/clang-tidy/tool/ClangTidyMain.cpp b/clang-tools-extra/clang-tidy/tool/ClangTidyMain.cpp index a9437a8..075df04 100644 --- a/clang-tools-extra/clang-tidy/tool/ClangTidyMain.cpp +++ b/clang-tools-extra/clang-tidy/tool/ClangTidyMain.cpp @@ -106,7 +106,7 @@ static cl::opt static cl::opt ListChecks("list-checks", cl::desc("List all enabled checks and exit. Use with\n" - "-checks='*' to list all available checks."), + "-checks=* to list all available checks."), cl::init(false), cl::cat(ClangTidyCategory)); static cl::opt Config( @@ -171,7 +171,7 @@ static void printStats(const ClangTidyStats &Stats) { << " with check filters"; llvm::errs() << ").\n"; if (Stats.ErrorsIgnoredNonUserCode) - llvm::errs() << "Use -header-filter='.*' to display errors from all " + llvm::errs() << "Use -header-filter=.* to display errors from all " "non-system headers.\n"; } } diff --git a/clang-tools-extra/docs/clang-tidy.rst b/clang-tools-extra/docs/clang-tidy.rst index b245665..2d1e136 100644 --- a/clang-tools-extra/docs/clang-tidy.rst +++ b/clang-tools-extra/docs/clang-tidy.rst @@ -29,13 +29,13 @@ negative globs remove them. For example, .. code-block:: console - $ clang-tidy test.cpp -checks='-*,clang-analyzer-*,-clang-analyzer-alpha*' + $ clang-tidy test.cpp -checks=-*,clang-analyzer-*,-clang-analyzer-alpha* will disable all default checks (``-*``) and enable all ``clang-analyzer-*`` checks except for ``clang-analyzer-alpha*`` ones. The ``-list-checks`` option lists all the enabled checks. When used without -``-checks=``, it shows checks enabled by default. Use ``-checks='*'`` to see all +``-checks=``, it shows checks enabled by default. Use ``-checks=*`` to see all available checks or with any other value of ``-checks=`` to see which checks are enabled by this value. @@ -135,7 +135,7 @@ An overview of all the command-line options: {"name":"file2.h"} ] -list-checks - List all enabled checks and exit. Use with - -checks='*' to list all available checks. + -checks=* to list all available checks. -p= - Build path -system-headers - Display the errors from system headers. @@ -243,26 +243,26 @@ The Directory Structure :: clang-tidy/ # Clang-tidy core. - ├── ClangTidy.h # Interfaces for users and checks. - ├── ClangTidyModule.h # Interface for clang-tidy modules. - ├── ClangTidyModuleRegistry.h # Interface for registering of modules. + |-- ClangTidy.h # Interfaces for users and checks. + |-- ClangTidyModule.h # Interface for clang-tidy modules. + |-- ClangTidyModuleRegistry.h # Interface for registering of modules. ... - ├── google/ # Google clang-tidy module. - │   ├── GoogleTidyModule.cpp - │   ├── GoogleTidyModule.h + |-- google/ # Google clang-tidy module. + |--  |-- GoogleTidyModule.cpp + |--  |-- GoogleTidyModule.h ... - ├── llvm/ # LLVM clang-tidy module. - │   ├── LLVMTidyModule.cpp - │   ├── LLVMTidyModule.h + |-- llvm/ # LLVM clang-tidy module. + |--  |-- LLVMTidyModule.cpp + |--  |-- LLVMTidyModule.h ... - └── tool/ # Sources of the clang-tidy binary. + |-- tool/ # Sources of the clang-tidy binary. ... test/clang-tidy/ # Integration tests. ... unittests/clang-tidy/ # Unit tests. - ├── ClangTidyTest.h - ├── GoogleModuleTest.cpp - ├── LLVMModuleTest.cpp + |-- ClangTidyTest.h + |-- GoogleModuleTest.cpp + |-- LLVMModuleTest.cpp ... @@ -487,7 +487,7 @@ The script provides multiple configuration flags. * The default set of checks can be overridden using the ``-checks`` argument, taking the identical format as :program:`clang-tidy` does. For example - ``-checks='-*,misc-use-override'`` will run the ``misc-use-override`` + ``-checks=-*,misc-use-override`` will run the ``misc-use-override`` checker only. * To restrict the files examined you can provide one or more regex arguments