You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Added functionality to detect file extensions in the specified path before language detection.
- Implemented logging for recognized file extensions and detected languages using the logger package.
- Improved error handling for invalid configurations in the Codacy YAML file.
Copy file name to clipboardExpand all lines: README.md
+46-3Lines changed: 46 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -71,6 +71,46 @@ Bootstraps the CLI configuration in your project's folder. This command creates
71
71
-`--organization` (string): Organization name, required with `--api-token`
72
72
-`--repository` (string): Repository name, required with `--api-token`
73
73
74
+
### `config reset` — Reset Configuration
75
+
76
+
Resets the Codacy configuration files and tool-specific configurations. This command overwrites existing configuration with either local default configurations or repository-specific configurations from Codacy.
77
+
78
+
```bash
79
+
# Reset to local default configurations
80
+
codacy-cli config reset
81
+
82
+
# Reset to repository-specific configurations from Codacy
-**Local mode**: Creates default configurations for all available tools
88
+
-**Remote mode**: Fetches and applies repository-specific configurations from Codacy
89
+
- Prevents accidental mode switching (remote to local requires explicit flags)
90
+
- Overwrites existing `.codacy/codacy.yaml` and tool configurations
91
+
- Creates or updates `.codacy/.gitignore` file
92
+
93
+
**Flags:** Same as `init` command (api-token, provider, organization, repository)
94
+
95
+
### `config discover` — Discover Project Languages
96
+
97
+
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.
98
+
99
+
```bash
100
+
# Discover languages in current directory
101
+
codacy-cli config discover .
102
+
103
+
# Discover languages in specific project path
104
+
codacy-cli config discover /path/to/project
105
+
```
106
+
107
+
**Features:**
108
+
- Automatically detects file extensions and maps them to programming languages
109
+
- Updates `.codacy/tools-configs/languages-config.yaml` with discovered languages
110
+
- Enables relevant tools in `codacy.yaml` based on detected languages
111
+
- Creates tool-specific configuration files for discovered tools
112
+
- Works in both local and cloud modes
113
+
74
114
### `install` — Install Runtimes and Tools
75
115
76
116
Installs all runtimes and tools specified in `.codacy/codacy.yaml`:
cmd.Flags().StringVar(&flags.ApiToken, "api-token", "", "Optional Codacy API token. If defined, configurations will be fetched from Codacy")
13
+
cmd.Flags().StringVar(&flags.Provider, "provider", "", "Provider (e.g., gh, bb, gl) to fetch configurations from Codacy. Required when api-token is provided")
14
+
cmd.Flags().StringVar(&flags.Organization, "organization", "", "Remote organization name to fetch configurations from Codacy. Required when api-token is provided")
15
+
cmd.Flags().StringVar(&flags.Repository, "repository", "", "Remote repository name to fetch configurations from Codacy. Required when api-token is provided")
0 commit comments