Skip to content
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

Does it make sense to add a Slim syntax validity check? #137

Open
yjukaku opened this issue Sep 21, 2021 · 1 comment
Open

Does it make sense to add a Slim syntax validity check? #137

yjukaku opened this issue Sep 21, 2021 · 1 comment

Comments

@yjukaku
Copy link
Contributor

yjukaku commented Sep 21, 2021

I wonder if checking if a Slim file has valid Slim syntax would make sense as part of this linting tool. WDYT @sds ?

I just ran into an issue with a file with markup like this, which "passes" slim-lint but is not valid Slim:

' Hello. This is some simple math:
= 1 + 1 # this equals 2 

The trailing Ruby style comment is actually not valid, and I always forget that.

The slim-lint check passed in our CI build, and we didn't happen to have a feature or view test for this file, so something like this got into our master branch. 😬

Would it make sense for slim-lint to run the slimrb command from the slim gem and fail the linting process if the file is not valid Slim?

@yjukaku yjukaku changed the title Does it make sense to add a Slim compilation check? Does it make sense to add a Slim syntax validity check? Sep 21, 2021
@sds
Copy link
Owner

sds commented Feb 23, 2022

Sorry for the delay in response. Supportive of a PR that adds the additional check!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants