diff --git a/README.md b/README.md index 0dc11647f..cb12e2b28 100644 --- a/README.md +++ b/README.md @@ -30,9 +30,9 @@ This will print the help message and return an error. To actually run Codyze you must specify a subcommand: ```shell -$ ./gradlew run --args="analyze" +$ ./gradlew run --args="--config=config.json runCoko cokoCpg" ``` -This will run the 'analyze' subcommand using the demo config file [`./codyze-cli/codyze.json`](./codyze-cli/codyze.json). +This will run the `runCoko` subcommand with the `cokoCpg` backend using the demo config file [`./codyze-cli/config.json`](./codyze-cli/config.json). For more information, please refer to the [documentation](https://www.codyze.io). diff --git a/docs/Getting Started/configuration.md b/docs/Getting Started/configuration.md index 348926648..aa3bde269 100644 --- a/docs/Getting Started/configuration.md +++ b/docs/Getting Started/configuration.md @@ -35,6 +35,14 @@ The configuration structure separates the options by subcommand as seen below. ``` In this example the `good-findings` argument belongs to Codyze, the `spec` argument belongs to the `runCoko` subcommand and the `source` argument belongs to the `cokoCpg` subcommand. The value of the option is taken from the object which corresponds to the subcommand used for the execution. + +It is important to note that the configuration file only sets the options for each subcommand but does not invoke the subcommand itself. +A complete usage example for using a configuration file in combination with subcommands looks as follows: +```shell +./gradlew :codyze-cli:run --args="--config=config.json runCoko cokoCpg" +``` +Mind that the config file must be specified as a top-level argument before calling the respective subcommands for the `executor` or `backend`. + An exemplary configuration file can also be found in the [GitHub repository ](https://github.com/Fraunhofer-AISEC/codyze/blob/main/codyze-cli/config.json){target=_blank}. ## List of Configurations