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

Unexpected fail linting #40

Open
sodacrackers opened this issue Apr 4, 2018 · 0 comments
Open

Unexpected fail linting #40

sodacrackers opened this issue Apr 4, 2018 · 0 comments
Labels

Comments

@sodacrackers
Copy link

It seems like this should pass, but fails.
The template works and looks fine when viewing pages though.

Twig Code:

{% set n = content.field_content_blocks['#items']|length %}
{% set classes = [
                'n-' ~ p,
                n is divisible by (2) ? 'n-twos',
                n is divisible by (3) ? 'n-threes'
        ] %}
        <section class="row crocosmias">
            <div class="col-xs-12 {{ classes|myextensions_join_parts }}">

Lint Error:

[ExecStack] Done in 7.663s
> validate:twig:files
Linting twig files...
Iterating over fileset files.twig...
KO in /www/repos/uwmcms/docroot/themes/custom/cust_theme/templates/node/node--fact-page.html.twig (line 28)
   26             {% set classes = [
   27                     'n-' ~ p,
>> 28                     (n is divisible by (2) ? 'n-twos',
>> An opened parenthesis is not properly closed. Unexpected token "name" of value "by" ("punctuation" expected with value ")"). 
   29                     (n is divisible by (3)) ? 'n-threes'
   30             ] %}

[error]  Executing `'/www/repos/cust_theme/vendor/bin/twig-lint' lint --only-print-errors '%s'` against fileset(s) files.twig returned a non-zero exit code.` 

@asm89 asm89 added the bug label Aug 26, 2021
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