Closed shartte closed 7 years ago
And what is considered invalid character?
def filenamePattern = ~/[a-z_0-9]+(?:\.[a-z]+)*/;
def directoryPattern = ~/[a-z_0-9]+/;
That seemed like the convention you came up with in #46
Actually, i used /[\p{Lower}|_]*/
.
Yay, you use groovy too :smile: !
It should actually be /[\p{Lower}|\p{Digit}|_]*\.json/
my sonarqube instance is also already complaining about it.
I could already run it against PRs and let it report. But it can get a bit noisy like here
I don't think only allowing .json is sufficient.
This was a quick first check. It should actually check a lot more (i.e. references). Another check it could do is check [blockstate/models/textures] for their respective file types and report incorrect extensions.
It is json specific. So it will also report invalid syntax, missing newline and such things.
I've run a short script on all files in our assets: