Open TheAfroOfDoom opened 10 months ago
linting rule idea: ensure every instance of # TODO
is in the correct format:
# TODO(xx): blah
✔️ , # TODO blah
❌ # TODO(xx): blah
✔️ , # TODO(xx) blah
❌ infrastructure for this was added in a50e084
(#62)
should be pretty easy now to add rules for the things mentioned above
see 787cd85
(#62)
https://github.com/TheAfroOfDoom/omega-flowey-minecraft-remastered/issues/37#issuecomment-1867324738
the TODO linting rule was done in e1b3d7a
(#67)
we can rely on Spyglass now that v4 is out once CLI linting is implemented
click to view outdated ticket description
we get a little bit of linting in vscode with [Datapack Helper Plus](https://marketplace.visualstudio.com/items?itemName=SPGoding.datapack-language-server), but DHP is pretty buggy and we shouldn't rely on it to actually lint, I don't think. instead we should probably write a script in-house to do stuff before we run the test server: we'd want the linting script to ensure to run on specific files (`.mcfunction`, `.json`, etc.) and check that: - they have a new-line at the end of the file - all (most? idk) strings use single quotes `'` instead of `"` - all SNBT has the correct white space; e.g. - `{Tags:["tag1","tag2"]}` wrong ❌ - `{ Tags: ["tag1", "tag2"] }` correct ✔️ we'll probably want more rules than above but that's a decent start.adding linting ensures our files have consistent styling (like SNBT whitespace)
~we'd also want to add this script to the
datapack.yml
/resourcepack.yml
workflows so that we run the linting script before we run the test server~ done