From 3112d40a11df9b0407c4c4f877e9929f2bf7e5da Mon Sep 17 00:00:00 2001 From: Kiron Date: Sun, 22 Dec 2024 17:26:04 +0800 Subject: [PATCH] doc: update about arguments --- documentation.md | 8 ++++++-- tests/self_test.cpp | 1 + 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/documentation.md b/documentation.md index 19d2a24..eb66a5c 100644 --- a/documentation.md +++ b/documentation.md @@ -31,8 +31,7 @@ from the configuration file are combined when bazel-compile-commands is called -a, --arguments -: Also write the array of arguments for each entry in the -`compile_commands.json` file. +: Provided only for backwards compatibility. -B, --bazel-command **BAZEL** @@ -48,6 +47,11 @@ from the configuration file are combined when bazel-compile-commands is called : Same as `--bazelopt "--config=CONFIG"`. A config option from `.bazelrc` to apply when querying Bazel for build actions. +--command + +: Generate a `compile_commands.json` file with `command` entries instead of +`arguments` entries. + -c, --compiler **FILE** : Replace the internal Bazel compiler wrapper script with this compiler (useful diff --git a/tests/self_test.cpp b/tests/self_test.cpp index 82ef80c..be50131 100644 --- a/tests/self_test.cpp +++ b/tests/self_test.cpp @@ -88,6 +88,7 @@ TEST(self_test, run) ASSERT_THAT(cu_obj.find("file"), Not(Eq(end))); EXPECT_THAT(cu_obj.find("directory"), Not(Eq(end))); + EXPECT_THAT(cu_obj.find("command"), Eq(end)); EXPECT_THAT(cu_obj.find("arguments"), Not(Eq(end))); EXPECT_THAT(cu_obj.find("output"), Not(Eq(end)));