codethesaur.us icon indicating copy to clipboard operation
codethesaur.us copied to clipboard

Add GitHub Action to automate validating JSON language files

Open geekygirlsarah opened this issue 3 years ago • 0 comments

Description

There's GitHub Actions for validating JSON syntax (i.e. "Are there any missing curly braces?") and for running unit tests. I'm typically the one that has to go through each file and see if it makes sense, see if it'll cause CT to mess up rendering. While this used to be fine and wasn't time consuming, it is now that more people have been finding this project. (A great problem to have!)

This should add a GitHub Action that will go through those language files and ensure that they match up with the _meta files, that they'll render right, that the IDs of all the concepts and categories and such are all correct, and spot any of the frequently missed things that people do. It should find them and (for now) leave a comment telling them what checks failed. (Maybe later can actually edit some of the files.)

Requirements

  • Look though thesaurus directories, see if any files don't match
  • Load MetaInfo, check directories are in MetaInfo
  • Also check structures are in MetaInfo
  • Ensure valid lang/version/name
  • Ensure categories aren't in file
  • Ensure name lines are removed
  • Ensure there's either code or not-implemented
  • Ensure if not-implemented, there's no code line
  • Ensure if code, there's no not-implemented
  • Code can be string or array (maybe warn if string)
  • There can be a comment
  • There shouldn't be any other fields

Additional Notes

I already started this, so I'm just making the issue to attach to it to ensure I get it done.

geekygirlsarah avatar Nov 26 '21 15:11 geekygirlsarah