summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/buildtool/common/cli.hpp4
-rw-r--r--src/buildtool/main/describe.cpp2
2 files changed, 5 insertions, 1 deletions
diff --git a/src/buildtool/common/cli.hpp b/src/buildtool/common/cli.hpp
index b1633716..387092bc 100644
--- a/src/buildtool/common/cli.hpp
+++ b/src/buildtool/common/cli.hpp
@@ -324,7 +324,9 @@ static inline auto SetupAnalysisArguments(
static inline auto SetupDescribeArguments(
gsl::not_null<CLI::App*> const& app,
gsl::not_null<DescribeArguments*> const& clargs) {
- app->add_flag("--json", clargs->print_json, "Print description as JSON.");
+ app->add_flag("--json",
+ clargs->print_json,
+ "Omit pretty-printing and describe rule in JSON format.");
app->add_flag("--rule",
clargs->describe_rule,
"Positional arguments refer to rule instead of target.");
diff --git a/src/buildtool/main/describe.cpp b/src/buildtool/main/describe.cpp
index 07a8febc..18836bf6 100644
--- a/src/buildtool/main/describe.cpp
+++ b/src/buildtool/main/describe.cpp
@@ -296,6 +296,8 @@ auto DescribeTarget(BuildMaps::Target::ConfiguredTarget const& id,
}
if (BuildMaps::Target::IsBuiltInRule(*rule_it)) {
if (print_json) {
+ // For built-in rules, we have no user-defined description to
+ // provide other than informing the user that it is a built-in rule.
std::cout << nlohmann::json({{"type", *rule_it}}).dump(2)
<< std::endl;
return kExitSuccess;