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
Copy file name to clipboardExpand all lines: README.md
+4-3Lines changed: 4 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,7 @@
1
1
# codacy-cli-v2
2
2
3
-
The `codacy-cli-v2` is a command-line tool for Codacy that supports analyzing code using tools like ESLint and uploading the results in SARIF format to Codacy. It provides two main commands: `analyze` and `upload`.
3
+
The Codacy CLI (version 2) is a command-line tool that supports analyzing code using tools like ESLint and uploading the results in SARIF format to Codacy.
4
+
The tool is invoked using the `codacy-cli` command, and provides two main commands: analyze and upload.
4
5
5
6
### Commands
6
7
@@ -32,13 +33,13 @@ The `codacy-cli-v2` is a command-line tool for Codacy that supports analyzing co
Copy file name to clipboardExpand all lines: cmd/analyze.go
+82-22Lines changed: 82 additions & 22 deletions
Original file line number
Diff line number
Diff line change
@@ -2,19 +2,23 @@ package cmd
2
2
3
3
import (
4
4
"codacy/cli-v2/config"
5
+
"codacy/cli-v2/plugins"
5
6
"codacy/cli-v2/tools"
6
7
"encoding/json"
7
8
"fmt"
8
9
"io"
9
10
"log"
10
11
"net/http"
11
12
"os"
13
+
"path/filepath"
14
+
15
+
"codacy/cli-v2/utils"
12
16
13
17
"github.com/spf13/cobra"
14
18
)
15
19
16
20
varoutputFilestring
17
-
vartoolToAnalyzestring
21
+
vartoolsToAnalyzeParamstring
18
22
varautoFixbool
19
23
varoutputFormatstring
20
24
varsarifPathstring
@@ -92,7 +96,7 @@ type Pattern struct {
92
96
93
97
funcinit() {
94
98
analyzeCmd.Flags().StringVarP(&outputFile, "output", "o", "", "Output file for analysis results")
95
-
analyzeCmd.Flags().StringVarP(&toolToAnalyze, "tool", "t", "", "Which tool to run analysis with")
99
+
analyzeCmd.Flags().StringVarP(&toolsToAnalyzeParam, "tool", "t", "", "Which tool to run analysis with. If not specified, all configured tools will be run")
96
100
analyzeCmd.Flags().StringVar(&outputFormat, "format", "", "Output format (use 'sarif' for SARIF format)")
97
101
analyzeCmd.Flags().BoolVar(&autoFix, "fix", false, "Apply auto fix to your issues when available")
Copy file name to clipboardExpand all lines: cmd/init.go
+9-8Lines changed: 9 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -32,9 +32,9 @@ var initFlags InitFlags
32
32
33
33
funcinit() {
34
34
initCmd.Flags().StringVar(&initFlags.apiToken, "api-token", "", "optional codacy api token, if defined configurations will be fetched from codacy")
35
-
initCmd.Flags().StringVar(&initFlags.provider, "provider", "", "optional provider (gh/bb/gl), if defined configurations will be fetched from codacy")
36
-
initCmd.Flags().StringVar(&initFlags.organization, "organization", "", "optional remote organization name, if defined configurations will be fetched from codacy")
37
-
initCmd.Flags().StringVar(&initFlags.repository, "repository", "", "optional remote repository name, if defined configurations will be fetched from codacy")
35
+
initCmd.Flags().StringVar(&initFlags.provider, "provider", "", "provider (gh/bb/gl) to fetch configurations from codacy, required when api-token is provided")
36
+
initCmd.Flags().StringVar(&initFlags.organization, "organization", "", "remote organization name to fetch configurations from codacy, required when api-token is provided")
37
+
initCmd.Flags().StringVar(&initFlags.repository, "repository", "", "remote repository name to fetch configurations from codacy, required when api-token is provided")
0 commit comments