discover-rewards-notifier icon indicating copy to clipboard operation
discover-rewards-notifier copied to clipboard

Fail CircleCI builds when files have syntax errors

Open nareddyt opened this issue 6 years ago • 2 comments

Fail a CircleCI build when a file has a syntax error. We should check all of the following file types:

  • .js
  • .json
  • .html
  • .css

The most important files to check would be in the /src/ directory. These are the code for the Chrome Extension, and we won't know that it's failing if we were to deploy it to users.

nareddyt avatar Mar 30 '18 15:03 nareddyt

If I'm not wrong this could be fixed adding a -run command and check that all files provided have the required extension. If I'm right i can easily modify the config.yml file in order to check the files extension.

LucaBozzetto avatar Oct 02 '18 00:10 LucaBozzetto

Hey! Yes, we could check the file extension but that won't tell us if there's a syntax error in the actual file.

For example, json file could be formatted because a contributor accidentally deleted a comma. The circleci build will still pass, but the extension would fail at run-time due to the incorrect JSON.

Based on the file extension, we need some way of checking if the syntax is correct for that file. Does that make sense?

nareddyt avatar Oct 02 '18 14:10 nareddyt