curlylint icon indicating copy to clipboard operation
curlylint copied to clipboard

Is it possible to exclude a block from linting?

Open craiga opened this issue 3 years ago • 3 comments

Is your proposal related to a problem?

I have a block of code which is triggering #23.

<span data-{{ triggers-issue}}>Hello, world!</span>

Before that issue is being fixed, I'd like to be able to just exclude that block from linting using something like a "noqa" comment.

Describe the solution you’d like

I'm not sure what would work; perhaps something like the following?

{# curlylintignore #}
  <span data-{{ triggers-issue}}>Hello, world!</span>
{# endcurlylintignore #}

Describe alternatives you’ve considered

I can ignore the entire file, but I'd like to be able to lint the rest of the file.

craiga avatar Oct 15 '20 10:10 craiga

Similar/same/very related with my new issue: #83

tomasbackman avatar Jul 09 '21 09:07 tomasbackman

FYI my issue is intermingling HTML and Django template language, e.g.,

{% if something %}
<li>
{% endif %}

{# 100 lines of template #}

{% if something %}
</li>
{% endif %}

Yes, I could break this into two templates, but I'm just saying, this is the issue that comes up for me.

dfrankow avatar Aug 06 '21 19:08 dfrankow

Some how when I corrected the tag things started to flow...

perhaps this was the issue? no sure but before that I had just

I hope others find this helpful

PaulMarcantonio avatar Sep 24 '21 16:09 PaulMarcantonio