File tree Expand file tree Collapse file tree 2 files changed +14
-6
lines changed
Expand file tree Collapse file tree 2 files changed +14
-6
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ The `codacy-cli-v2` is a command-line tool for Codacy that supports analyzing co
2929
3030### Important Concepts
3131
32- - ** ` .codacy/. codacy.yaml ` ** : Configuration file to specify ` node ` and ` eslint ` versions for the CLI.
32+ - ** ` .codacy/codacy.yaml ` ** : Configuration file to specify ` node ` and ` eslint ` versions for the CLI.
3333 ``` yaml
3434 runtimes :
3535@@ -66,29 +66,29 @@ alias codacy-cli-v2="bash <(curl -Ls https://raw.githubusercontent.com/codacy/co
6666Before running the analysis, install the specified tools :
6767
6868` ` ` bash
69- codacy-cli-v2 install
69+ codacy-cli install
7070` ` `
7171
7272# ## Run Analysis
7373
7474To run ESLint and output the results to the terminal :
7575
7676` ` ` bash
77- codacy-cli-v2 analyze --tool eslint
77+ codacy-cli analyze --tool eslint
7878` ` `
7979
8080To store the results as SARIF in a file :
8181
8282` ` ` bash
83- codacy-cli-v2 analyze -t eslint -o eslint.sarif
83+ codacy-cli analyze -t eslint -o eslint.sarif
8484` ` `
8585
8686# # Upload Results
8787
8888To upload a SARIF file to Codacy :
8989
9090` ` ` bash
91- codacy-cli-v2 upload -s path/to/your.sarif -c your-commit-uuid -t your-project-token
91+ codacy-cli upload -s path/to/your.sarif -c your-commit-uuid -t your-project-token
9292` ` `
9393
9494# ## Example Repository
Original file line number Diff line number Diff line change @@ -83,7 +83,15 @@ func (c *ConfigType) initCodacyDirs() {
8383 if err != nil {
8484 log .Fatal (err )
8585 }
86- c .projectConfigFile = filepath .Join (c .localCodacyDirectory , "codacy.yaml" )
86+
87+ yamlPath := filepath .Join (c .localCodacyDirectory , "codacy.yaml" )
88+ ymlPath := filepath .Join (c .localCodacyDirectory , "codacy.yml" )
89+
90+ if _ , err := os .Stat (ymlPath ); err == nil {
91+ c .projectConfigFile = ymlPath
92+ } else {
93+ c .projectConfigFile = yamlPath
94+ }
8795}
8896
8997func Init () {
You can’t perform that action at this time.
0 commit comments