codacy/codacy-analysis-cli

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

AlexBaranowski opened this issue · 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

Internal ticket created : TS-434