codacy-analysis-cli icon indicating copy to clipboard operation
codacy-analysis-cli copied to clipboard

[TS-434] codacy-analysis-cli validate-configuration does not inform about file not starting with `---`

Open AlexBaranowski opened this issue 2 years ago • 1 comments

Hi!

First of all, I'm thankful for Your product. Great job!

Yesterday I was playing with the Codacy config file. In documentation, there is the section with important paragraph https://docs.codacy.com/repositories-configure/codacy-configuration-file/#codacy-configuration-file saying that file must start with the ---.

OFC during writing my own .codacy.yml I somehow missed it. I validated the file with the:

codacy-analysis-cli validate-configuration --directory $(pwd)

And it **did not ** inform me about this mistake.

To sum it up:

File

---
exclude_paths:
  - "**/testsuite/**"

output

Successfully loaded the Codacy configuration file in /home/Alex/tmp/XXX/.codacy.yaml
CodacyConfigurationFile(None, Some(Set(Glob("**/testsuite/**"))), None)

File without ---

exclude_paths:
  - "**/testsuite/**"

output

Successfully loaded the Codacy configuration file in /home/Alex/tmp/XXX/.codacy.yaml
CodacyConfigurationFile(None, Some(Set(Glob("**/testsuite/**"))), None)

I'm believing that for a file that does not begin with --- it should print an error.

Best, Alex

AlexBaranowski avatar Jun 21 '23 10:06 AlexBaranowski

Internal ticket created : TS-434

github-actions[bot] avatar Jun 21 '23 10:06 github-actions[bot]