question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

separate rule violations with the same line, column and rule name cannot both create a TODO

See original GitHub issue

Example failure (1 TODO created, 1 violation not converted to TODO)

  2:2  todo  <div> has a role of tab, it cannot have semantic descendants like <h5>  require-presentational-children
  2:2  error  <div> has a role of tab, it cannot have semantic descendants like <a>  require-presentational-children

note the offending h5 and a elements are not on line 2 in the associated file, that is merely where the div opens.

Offending content (sorry for the 😱 code)

<div class="card analytics-runner-card no-radius">
  <div
  class="card-header analytics-runner-card-header no-radius"
  role="tab"
  id="columnsAria"
>
  <h5 class="mb-0">
    <a
      data-toggle="collapse"
      class="nav-link"
      data-parent="#accordion"
      href="#columns"
      aria-expanded="false"
      aria-controls="columns"
    >
      {{t "analytics.column_order"}}
    </a>
  </h5>
</div>
</div>

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
scalvertcommented, Mar 22, 2022

This does seem like we’re incorrectly reporting the line/column for the violation. If the same rule is flagged with the same line/column, it’s considered the same.

I suspect this is a bug in the rule, not todos.

1reaction
rwjbluecommented, Jan 18, 2022

Hmmm. Seems to me like the issue is with which node we are reporting as incorrect (RE: line + col). We should either report only a single error for this case (which would make todo’s work fine), or report individual errors but using the specific invalid child as the line+col instead of always using the parent’s node.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Restrict data input by using validation rules - Microsoft Support
Record Validation Rule You can use a record validation rule to specify a condition that all valid records must satisfy. You can compare...
Read more >
Transformation rules and actions - AWS Documentation
You can apply several transformation rule actions on any level as long as each transformation action is applied against a different object. Column...
Read more >
markdownlint/Rules.md at main - GitHub
This rule is triggered when different heading styles are used in the same document ... In strict or stern modes, the two middle...
Read more >
Working with Rules - ESLint - Pluggable JavaScript Linter
A pluggable and configurable linter tool for identifying and reporting on patterns in JavaScript. Maintain your code quality with ease.
Read more >
DOB NOW: Build Frequently Asked Questions - NYC.gov
How do I change the address, name or business name associated with my eFiling account?
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found