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

Update test to avoid false negative when include contains an empty line #2

Open
mgrsskls opened this issue Jun 17, 2022 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@mgrsskls
Copy link
Member

This case is incorrectly reported as an error:

{% include "template.twig" with {

} only %}
@d34dman d34dman added the bug Something isn't working label Jun 17, 2022
@d34dman
Copy link
Member

d34dman commented Jun 17, 2022

Investigated this a little and found that our test is throwing false negative.

The test is catching a different violation called "0 space should be used for empty hashes" when we use above code.

array (
  0 => 
  FriendsOfTwig\Twigcs\Validator\Violation::__set_state(array(
     'line' => 31,
     'column' => 41,
     'reason' => '0 space should be used for empty hashes.',
     'filename' => 'src.html.twig',
     'severity' => 3,
     'source' => 'FriendsOfTwig\\Twigcs\\Rule\\RegEngineRule',
  )),
)

@d34dman d34dman changed the title False negative when include contains an empty line Update test to avoid false negative when include contains an empty line Jun 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants