New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added sanity checks to the Lua script trait #20898
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CheckLuaScriptFileExistance
?
Or would you add future other LuaScript validations also to this class.
No checks on strange or dangerous filenames? Like empty, spaces, dots and path characters, non utf8? Or not needed?
I think it would make sense to include this in the server lint pass as well |
I thought about maybe migrating the Lua syntax check in here because we can check against the API, but not now. |
593e0fd
to
891e684
Compare
For me this lint check is case insensitive. I suppose CI will trigger errors but my PC doesn't |
macOS and Windows are case-insensitive. |
by default yes, what I meant was shouldn't the lint always be case sensitive? |
I guess it uses the native file system to load files and that is why. |
Sorry, I won't reimplement operating system file systems for this. It is clearly nonsensical and out of scope. |
Then it's not much of a sanity check. I thought the main purpose was to check case discrepancies |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Anyhow, CI tests should catch it and that's enough to warrant a merge
This catches some basic errors such as wrong trait location and case-sensitive file name pitfalls.