Skip to content

Conversation

@JDevlieghere
Copy link
Member

We follow LLVM's style guide for diagnostics, which instructs to start the first sentence with a lowercase letter, and finish the last sentence without a period, if it would end in one otherwise.

We follow LLVM's style guide for diagnostics, which instructs to start
the first sentence with a lowercase letter, and finish the last sentence
without a period, if it would end in one otherwise.
@llvmbot
Copy link
Member

llvmbot commented Dec 9, 2025

@llvm/pr-subscribers-lldb

Author: Jonas Devlieghere (JDevlieghere)

Changes

We follow LLVM's style guide for diagnostics, which instructs to start the first sentence with a lowercase letter, and finish the last sentence without a period, if it would end in one otherwise.


Full diff: https://github.com/llvm/llvm-project/pull/171519.diff

4 Files Affected:

  • (modified) lldb/source/Interpreter/CommandInterpreter.cpp (+2-4)
  • (modified) lldb/test/API/functionalities/abbreviation/TestAbbreviations.py (+1-1)
  • (modified) lldb/test/API/functionalities/ambigous_commands/TestAmbiguousCommands.py (+1-1)
  • (modified) lldb/test/API/functionalities/wrong_commands/TestWrongCommands.py (+1-1)
diff --git a/lldb/source/Interpreter/CommandInterpreter.cpp b/lldb/source/Interpreter/CommandInterpreter.cpp
index cb6acfc9c29a9..afc1753e21c46 100644
--- a/lldb/source/Interpreter/CommandInterpreter.cpp
+++ b/lldb/source/Interpreter/CommandInterpreter.cpp
@@ -3702,12 +3702,10 @@ CommandInterpreter::ResolveCommandImpl(std::string &command_line,
           done = static_cast<bool>(cmd_obj);
         } else {
           StreamString error_msg;
-          error_msg.Printf("Ambiguous command '%s'. Possible matches:\n",
+          error_msg.Printf("ambiguous command '%s'. Possible matches:\n",
                            next_word.c_str());
-
-          for (uint32_t i = 0; i < num_matches; ++i) {
+          for (uint32_t i = 0; i < num_matches; ++i)
             error_msg.Printf("\t%s\n", matches.GetStringAtIndex(i));
-          }
           result.AppendError(error_msg.GetString());
         }
       } else {
diff --git a/lldb/test/API/functionalities/abbreviation/TestAbbreviations.py b/lldb/test/API/functionalities/abbreviation/TestAbbreviations.py
index 5dd4f6bee56a3..e5bbb9ee2eb9d 100644
--- a/lldb/test/API/functionalities/abbreviation/TestAbbreviations.py
+++ b/lldb/test/API/functionalities/abbreviation/TestAbbreviations.py
@@ -41,7 +41,7 @@ def test_command_abbreviations_and_aliases(self):
         # "pl" could be "platform" or "plugin".
         command_interpreter.ResolveCommand("pl", result)
         self.assertFalse(result.Succeeded())
-        self.assertTrue(result.GetError().startswith("error: Ambiguous command"))
+        self.assertTrue(result.GetError().startswith("error: ambiguous command"))
 
         # Make sure an unabbreviated command is not mangled.
         command_interpreter.ResolveCommand(
diff --git a/lldb/test/API/functionalities/ambigous_commands/TestAmbiguousCommands.py b/lldb/test/API/functionalities/ambigous_commands/TestAmbiguousCommands.py
index 31b67d72ce469..f114820d16347 100644
--- a/lldb/test/API/functionalities/ambigous_commands/TestAmbiguousCommands.py
+++ b/lldb/test/API/functionalities/ambigous_commands/TestAmbiguousCommands.py
@@ -24,7 +24,7 @@ def test_ambiguous_command_with_alias(self):
         self.assertFalse(result.Succeeded())
         self.assertEqual(
             result.GetError(),
-            "error: Ambiguous command 'co'. Possible matches:\n\tcommand\n\tcontinue\n\tcorefile\n",
+            "error: ambiguous command 'co'. Possible matches:\n\tcommand\n\tcontinue\n\tcorefile\n",
         )
 
         command_interpreter.HandleCommand("command unalias continue", result)
diff --git a/lldb/test/API/functionalities/wrong_commands/TestWrongCommands.py b/lldb/test/API/functionalities/wrong_commands/TestWrongCommands.py
index 25f95f3061eb4..941a909aa93aa 100644
--- a/lldb/test/API/functionalities/wrong_commands/TestWrongCommands.py
+++ b/lldb/test/API/functionalities/wrong_commands/TestWrongCommands.py
@@ -18,7 +18,7 @@ def test_ambiguous_command(self):
         command_interpreter.HandleCommand("g", result)
         self.assertFalse(result.Succeeded())
         self.assertRegex(
-            result.GetError(), "error: Ambiguous command 'g'. Possible matches:"
+            result.GetError(), "error: ambiguous command 'g'. Possible matches:"
         )
         self.assertRegex(result.GetError(), "gui")
         self.assertRegex(result.GetError(), "gdb-remote")

@JDevlieghere
Copy link
Member Author

JDevlieghere commented Dec 9, 2025

The yak shaving continues. Ran into this in #171517.

@JDevlieghere JDevlieghere merged commit 29760ce into llvm:main Dec 10, 2025
12 checks passed
@JDevlieghere JDevlieghere deleted the fix-ambiguous-capitalization branch December 10, 2025 00:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants