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

Identify syntax error in array #167

Open
MPParsley opened this issue Feb 2, 2021 · 1 comment
Open

Identify syntax error in array #167

MPParsley opened this issue Feb 2, 2021 · 1 comment
Labels

Comments

@MPParsley
Copy link

MPParsley commented Feb 2, 2021

The following snippet should result in an error due to a missing comma after 'line_two' but it doesn't:

{%
set classes = [
  'line_one',
  'line_two'
  'line_three',
]
%}
<div{{ attributes.addClass(classes) }}>
  <h2>{{ content }}</h2>
</div>
$ vendor/bin/twigcs templates 
No violation found.
@OwlyCode
Copy link
Collaborator

I looked around what causes this issue and it is due to the lack of parsing from twigcs. We only tokenize in order to check the codestyle. We would need to use the parser to make sure the files are valid.

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

No branches or pull requests

2 participants