From: Ilya Biryukov Date: Tue, 28 May 2019 09:31:27 +0000 (+0000) Subject: [clangd] Never end command-line flag description with a period. NFC X-Git-Tag: llvmorg-10-init~4495 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d12f48beda022da99e3033cc166ee53a4ebee772;p=platform%2Fupstream%2Fllvm.git [clangd] Never end command-line flag description with a period. NFC For consistency. Not having a period at the end is much more common and seems to be the preferred style for command-line options. llvm-svn: 361800 --- diff --git a/clang-tools-extra/clangd/tool/ClangdMain.cpp b/clang-tools-extra/clangd/tool/ClangdMain.cpp index 106b7d6..90e00e0 100644 --- a/clang-tools-extra/clangd/tool/ClangdMain.cpp +++ b/clang-tools-extra/clangd/tool/ClangdMain.cpp @@ -37,14 +37,14 @@ namespace clangd { // FIXME: remove this option when Dex is cheap enough. static llvm::cl::opt UseDex("use-dex-index", - llvm::cl::desc("Use experimental Dex dynamic index."), + llvm::cl::desc("Use experimental Dex dynamic index"), llvm::cl::init(true), llvm::cl::Hidden); static llvm::cl::opt CompileCommandsDir( "compile-commands-dir", llvm::cl::desc("Specify a path to look for compile_commands.json. If path " "is invalid, clangd will look in the current directory and " - "parent paths of each source file.")); + "parent paths of each source file")); static llvm::cl::opt WorkerThreadsCount("j", @@ -59,10 +59,10 @@ static llvm::cl::opt CompletionStyle( llvm::cl::values( clEnumValN(Detailed, "detailed", "One completion item for each semantically distinct " - "completion, with full type information."), + "completion, with full type information"), clEnumValN(Bundled, "bundled", "Similar completion items (e.g. function overloads) are " - "combined. Type information shown where possible.")), + "combined. Type information shown where possible")), llvm::cl::init(Detailed)); // FIXME: Flags are the wrong mechanism for user preferences. @@ -98,12 +98,12 @@ static llvm::cl::opt Test("lit-test", llvm::cl::desc("Abbreviation for -input-style=delimited -pretty -sync " "-enable-test-scheme -log=verbose." - "Intended to simplify lit tests."), + "Intended to simplify lit tests"), llvm::cl::init(false), llvm::cl::Hidden); static llvm::cl::opt EnableTestScheme( "enable-test-uri-scheme", - llvm::cl::desc("Enable 'test:' URI scheme. Only use in lit tests."), + llvm::cl::desc("Enable 'test:' URI scheme. Only use in lit tests"), llvm::cl::init(false), llvm::cl::Hidden); enum PCHStorageFlag { Disk, Memory }; @@ -119,7 +119,7 @@ static llvm::cl::opt PCHStorage( static llvm::cl::opt LimitResults( "limit-results", llvm::cl::desc("Limit the number of results returned by clangd. " - "0 means no limit. (default=100)"), + "0 means no limit (default=100)"), llvm::cl::init(100)); static llvm::cl::opt @@ -134,7 +134,7 @@ static llvm::cl::opt static llvm::cl::opt InputMirrorFile( "input-mirror-file", llvm::cl::desc( - "Mirror all LSP input to the specified file. Useful for debugging."), + "Mirror all LSP input to the specified file. Useful for debugging"), llvm::cl::init(""), llvm::cl::Hidden); static llvm::cl::opt EnableIndex( @@ -142,7 +142,7 @@ static llvm::cl::opt EnableIndex( llvm::cl::desc( "Enable index-based features. By default, clangd maintains an index " "built from symbols in opened files. Global index support needs to " - "enabled separatedly."), + "enabled separatedly"), llvm::cl::init(true), llvm::cl::Hidden); static llvm::cl::opt AllScopesCompletion( @@ -151,7 +151,7 @@ static llvm::cl::opt AllScopesCompletion( "If set to true, code completion will include index symbols that are " "not defined in the scopes (e.g. " "namespaces) visible from the code completion point. Such completions " - "can insert scope qualifiers."), + "can insert scope qualifiers"), llvm::cl::init(true)); static llvm::cl::opt ShowOrigins( @@ -167,7 +167,7 @@ static llvm::cl::opt HeaderInsertion( "Include what you use. " "Insert the owning header for top-level symbols, unless the " "header is already directly included or the symbol is " - "forward-declared."), + "forward-declared"), clEnumValN( CodeCompleteOptions::NeverInsert, "never", "Never insert #include directives as part of code completion"))); @@ -176,16 +176,16 @@ static llvm::cl::opt HeaderInsertionDecorators( "header-insertion-decorators", llvm::cl::desc("Prepend a circular dot or space before the completion " "label, depending on whether " - "an include line will be inserted or not."), + "an include line will be inserted or not"), llvm::cl::init(true)); static llvm::cl::opt IndexFile( "index-file", llvm::cl::desc( "Index file to build the static index. The file must have been created " - "by a compatible clangd-indexer.\n" + "by a compatible clangd-indexer\n" "WARNING: This option is experimental only, and will be removed " - "eventually. Don't rely on it."), + "eventually. Don't rely on it"), llvm::cl::init(""), llvm::cl::Hidden); static llvm::cl::opt EnableBackgroundIndex( @@ -200,7 +200,7 @@ static llvm::cl::opt BackgroundIndexRebuildPeriod( llvm::cl::desc( "If set to non-zero, the background index rebuilds the symbol index " "periodically every X milliseconds; otherwise, the " - "symbol index will be updated for each indexed file."), + "symbol index will be updated for each indexed file"), llvm::cl::init(5000), llvm::cl::Hidden); enum CompileArgsFrom { LSPCompileArgs, FilesystemCompileArgs }; @@ -218,19 +218,19 @@ static llvm::cl::opt EnableFunctionArgSnippets( "function-arg-placeholders", llvm::cl::desc("When disabled, completions contain only parentheses for " "function calls. When enabled, completions also contain " - "placeholders for method parameters."), + "placeholders for method parameters"), llvm::cl::init(CodeCompleteOptions().EnableFunctionArgSnippets)); static llvm::cl::opt ClangTidyChecks( "clang-tidy-checks", llvm::cl::desc( "List of clang-tidy checks to run (this will override " - ".clang-tidy files). Only meaningful when -clang-tidy flag is on."), + ".clang-tidy files). Only meaningful when -clang-tidy flag is on"), llvm::cl::init("")); static llvm::cl::opt EnableClangTidy("clang-tidy", - llvm::cl::desc("Enable clang-tidy diagnostics."), + llvm::cl::desc("Enable clang-tidy diagnostics"), llvm::cl::init(true)); static llvm::cl::opt @@ -242,13 +242,13 @@ static llvm::cl::opt static llvm::cl::opt SuggestMissingIncludes( "suggest-missing-includes", llvm::cl::desc("Attempts to fix diagnostic errors caused by missing " - "includes using index."), + "includes using index"), llvm::cl::init(true)); static llvm::cl::opt ForceOffsetEncoding( "offset-encoding", llvm::cl::desc("Force the offsetEncoding used for character positions. " - "This bypasses negotiation via client capabilities."), + "This bypasses negotiation via client capabilities"), llvm::cl::values(clEnumValN(OffsetEncoding::UTF8, "utf-8", "Offsets are in UTF-8 bytes"), clEnumValN(OffsetEncoding::UTF16, "utf-16",