Hugo

Issue On Codacy Becaue Of 3 Dashes

Dear All

I created _index.md file inside of blog folder. But I getting an error on codacy.com because of 3 dashes inside that file like this:

---
title: Blog
layout: list
---

How to fix this issue?

On Codacy follow the breadcrumbs;

  • click Issues on the left
  • click one of the issues with the three dashes (clicking the line with the triangle on the right side will open the issue up
  • click on the little cog-wheel on the right side
  • click “remove pattern”

This is not an issue to be fixed, it’s a false positive, so don’t test it and it won’t count against your files.

You can check under “code patterns” on the left side menue what patterns are enabled. If you never set them up by yourself it can be that there are several rules active that you don’t want enabled. The way I set it up is by having configuration files for the tests I want and if Codacy offers more I see if it makes sense here. Marking three dashes as error makes no sense for a Hugo setup, so disable it :slight_smile:

Edit: after you removed the pattern click on commits, then click the last commit and let codacy re-check the commit to see if the errors disappeared.

1 Like

Yes, it’s just a false warning. And after I remove that pattern, my score upgraded to A again. Thanks.