Skip to content

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

@yjukaku

Description

@yjukaku

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?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions