Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
349 changes: 349 additions & 0 deletions docs/codacy-analysis-cli/index.md

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/codacy-cloud-cli/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,7 @@ From there, pipe the JSON output to `jq`, post results as PR comments with the [
## See also

- [Codacy Cloud CLI on GitHub](https://github.com/codacy/codacy-cloud-cli)
- [Codacy Analysis CLI](../codacy-analysis-cli/index.md)
- [Codacy Skills](../codacy-skills/index.md)
- [API tokens](../codacy-api/api-tokens.md)
- [Using the Codacy API](../codacy-api/using-the-codacy-api.md)
Expand Down
2 changes: 1 addition & 1 deletion docs/codacy-guardrails/codacy-guardrails-faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Codacy Guardrails isn't a large language model, but an IDE extension that uses a
## When I change some analysis configuration in the UI, is it automatically applied to Guardrails?
Not immediately, but you don't have to do anything special either. For a repository connected to Codacy Cloud, Guardrails re-syncs your local configuration in the background whenever you add a new file to the repository, pulling a fresh copy of your patterns from Codacy Cloud. Changes you make in the UI are picked up on that next sync.

To force the sync right away, you can run the standalone [Codacy Analysis CLI](codacy-guardrails-getting-started.md#install-cli) in your repository:
To force the sync right away, you can run the standalone [Codacy Analysis CLI](../codacy-analysis-cli/index.md) in your repository:

``` bash
npm i -g @codacy/analysis-cli
Expand Down
4 changes: 2 additions & 2 deletions docs/codacy-guardrails/codacy-guardrails-getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ It will create a folder in your local repository called **.codacy** with all nee
- `codacy.config.json` and `codacy.config.baseline.json`: which built-in scanners and rules run on your repository
- `generated/`: the per-scanner configuration files derived from them at analysis time

These files belong to the [Codacy Analysis CLI](https://www.npmjs.com/package/@codacy/analysis-cli) that the extension bundles, and the extension writes and updates them for you. To change which rules run, [customize them on Codacy Cloud](codacy-guardrails-how-to-configure-rules.md) rather than editing these files.
These files belong to the [Codacy Analysis CLI](../codacy-analysis-cli/index.md) that the extension bundles, and the extension writes and updates them for you. To change which rules run, [customize them on Codacy Cloud](codacy-guardrails-how-to-configure-rules.md) rather than editing these files.

!!! note
Commit `codacy.config.json` and `codacy.config.baseline.json` so your team analyzes against the same configuration. The CLI already keeps the `generated/` subfolder out of version control for you, via a `.codacy/.gitignore` file.
Expand Down Expand Up @@ -133,7 +133,7 @@ You can later generate the instructions manually from the Guardrails section of

#### Download

The Codacy Analysis CLI is distributed as an npm package and installs the same way on macOS, Linux, and Windows:
The Codacy Analysis CLI is distributed as an npm package and installs the same way on macOS, Linux, and Windows. See [Codacy Analysis CLI](../codacy-analysis-cli/index.md) for its full command reference.

```bash
npm i -g @codacy/analysis-cli
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

### Diagnosing local analysis issues

Whenever local analysis or Guardrails scanning isn't behaving as expected, the standalone [Codacy Analysis CLI](codacy-guardrails-getting-started.md#install-cli) can tell you the state of your setup: your authentication status, your system information, and every analysis tool it knows about, along with whether each one is installed locally.
Whenever local analysis or Guardrails scanning isn't behaving as expected, the standalone [Codacy Analysis CLI](../codacy-analysis-cli/index.md) can tell you the state of your setup: your authentication status, your system information, and every analysis tool it knows about, along with whether each one is installed locally.

The IDE extension bundles its own copy of the analyzer and doesn't put the `codacy-analysis` command on your `PATH`, so install the CLI first:

Expand Down
4 changes: 2 additions & 2 deletions docs/codacy-skills/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ npm install -g @codacy/codacy-cloud-cli
npm install -g @codacy/analysis-cli
```

`codacy-cloud-cli` needs only the Codacy Cloud CLI and `codacy-analysis-cli` only the Codacy Analysis CLI. `setup-coverage` also needs the repository to be added to Codacy.
`codacy-cloud-cli` needs only the [Codacy Cloud CLI](../codacy-cloud-cli/index.md) and `codacy-analysis-cli` only the [Codacy Analysis CLI](../codacy-analysis-cli/index.md). `setup-coverage` also needs the repository to be added to Codacy.

Then authenticate. Run `codacy login` and paste an [account API token](../codacy-api/api-tokens.md#account-api-tokens), or set the `CODACY_API_TOKEN` environment variable for non-interactive environments. Both CLIs read the same credentials from `~/.codacy/credentials`, so a single login covers both.

See [Codacy Cloud CLI](../codacy-cloud-cli/index.md#authentication) for the full set of authentication options, including repository API tokens.
See [Codacy Cloud CLI](../codacy-cloud-cli/index.md#authentication) and [Codacy Analysis CLI](../codacy-analysis-cli/index.md#authentication) for the full set of authentication options, including repository API tokens.

## Install the skills

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Codacy supports client-side tools in two ways:
The legacy Codacy Analysis CLI automatically fetches the code pattern settings that you define on the Codacy UI and applies them when running the tools.

!!! note
This is a separate, older tool from the [Codacy Analysis CLI](../../codacy-guardrails/codacy-guardrails-getting-started.md#install-cli) (`@codacy/analysis-cli`, the `codacy-analysis` command) that powers Codacy Guardrails and [running ESLint locally](running-eslint.md). The tools listed below don't have an equivalent on the newer CLI yet.
This is a separate, older tool from the [Codacy Analysis CLI](../../codacy-analysis-cli/index.md) (`@codacy/analysis-cli`, the `codacy-analysis` command) that powers Codacy Guardrails and [running ESLint locally](running-eslint.md). The tools listed below don't have an equivalent on the newer CLI yet.

- **Standalone tools:** Codacy provides auxiliary converters that parse the output of third-party tools and convert to a format that you then upload to Codacy. You must download, configure, and run the third-party tools yourself.<!-- NOTE: If updating this line or the one below, search for and update the matching UI copy on the Code patterns page in codacy-spa. -->

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ To run ESLint as a [client-side tool](client-side-tools.md):

## Manual configuration

Install the Codacy Analysis CLI and initialize the repository. Initialization writes `.codacy/codacy.config.json`, which `analyze` requires: pulling it from Codacy Cloud with `init --remote` means the local run uses the same ESLint patterns as your repository's **Code patterns** page.
Install the [Codacy Analysis CLI](../../codacy-analysis-cli/index.md) and initialize the repository. Initialization writes `.codacy/codacy.config.json`, which `analyze` requires: pulling it from Codacy Cloud with `init --remote` means the local run uses the same ESLint patterns as your repository's **Code patterns** page.

```bash
npm i -g @codacy/analysis-cli
Expand Down
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -769,6 +769,7 @@ nav:
- codacy-api/examples/uploading-dast-results.md
- codacy-api/examples/triggering-dast-scans.md
- Codacy CLIs:
- codacy-analysis-cli/index.md
- codacy-cloud-cli/index.md
- Codacy Skills:
- codacy-skills/index.md
Expand Down
Loading