Skip to content

Commit a1fd045

Browse files
readme update
1 parent 1929634 commit a1fd045

File tree

1 file changed

+25
-3
lines changed

1 file changed

+25
-3
lines changed

README.md

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,25 @@ Bootstraps the CLI configuration in your project's folder. This command creates
7171
- `--organization` (string): Organization name, required with `--api-token`
7272
- `--repository` (string): Repository name, required with `--api-token`
7373

74+
### `config discover` — Discover Project Languages
75+
76+
Scans a project directory to detect programming languages and automatically configures appropriate static analysis tools. This command updates both `languages-config.yaml` and `codacy.yaml` with relevant tools for detected languages.
77+
78+
```bash
79+
# Discover languages in current directory
80+
codacy-cli config discover .
81+
82+
# Discover languages in specific project path
83+
codacy-cli config discover /path/to/project
84+
```
85+
86+
**Features:**
87+
- Automatically detects file extensions and maps them to programming languages
88+
- Updates `.codacy/tools-configs/languages-config.yaml` with discovered languages
89+
- Enables relevant tools in `codacy.yaml` based on detected languages
90+
- Creates tool-specific configuration files for discovered tools
91+
- Works in both local and cloud modes
92+
7493
### `install` — Install Runtimes and Tools
7594

7695
Installs all runtimes and tools specified in `.codacy/codacy.yaml`:
@@ -172,14 +191,17 @@ codacy-cli init
172191
# or
173192
codacy-cli init --api-token <token> --provider gh --organization my-org --repository my-repo
174193

175-
# 2. Install all required runtimes and tools
194+
# 2. (Optional) Discover languages and configure tools automatically
195+
codacy-cli config discover .
196+
197+
# 3. Install all required runtimes and tools
176198
codacy-cli install
177199

178-
# 3. Run analysis (all tools or specific tool)
200+
# 4. Run analysis (all tools or specific tool)
179201
codacy-cli analyze
180202
codacy-cli analyze --tool eslint
181203

182-
# 4. Upload results to Codacy
204+
# 5. Upload results to Codacy
183205
codacy-cli upload -s eslint.sarif -c <commit-uuid> -t <project-token>
184206
```
185207

0 commit comments

Comments
 (0)