mirror of
https://github.com/github/codeql.git
synced 2026-05-03 04:39:29 +02:00
JavaScript: Highlight id attribute (not entire element) in AmbiguousIdAttribute.
This commit is contained in:
@@ -1,3 +1,3 @@
|
||||
| AmbiguousIdAttribute.html:4:1:4:29 | <li>...</> | This element has the same id as $@. | AmbiguousIdAttribute.html:5:1:5:30 | <li>...</> | another element |
|
||||
| AmbiguousIdAttribute_fragment.html:2:3:3:2 | <li>...</> | This element has the same id as $@. | AmbiguousIdAttribute_fragment.html:3:3:3:32 | <li>...</> | another element |
|
||||
| tst.js:22:17:22:40 | <div id ... ></div> | This element has the same id as $@. | tst.js:22:41:22:64 | <div id ... ></div> | another element |
|
||||
| AmbiguousIdAttribute.html:4:5:4:14 | id=first | This element has the same id as $@. | AmbiguousIdAttribute.html:5:5:5:14 | id=first | another element |
|
||||
| AmbiguousIdAttribute_fragment.html:2:7:2:16 | id=first | This element has the same id as $@. | AmbiguousIdAttribute_fragment.html:3:7:3:16 | id=first | another element |
|
||||
| tst.js:22:22:22:33 | id="theDiff" | This element has the same id as $@. | tst.js:22:46:22:57 | id="theDiff" | another element |
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
| DuplicateAttributes.html:1:4:1:28 | href=https://semmle.com | This attribute is duplicated $@. | DuplicateAttributes.html:1:30:1:54 | href=https://semmle.com | here |
|
||||
| tst.js:9:4:9:28 | href="h ... le.com" | This attribute is duplicated $@. | tst.js:9:30:9:54 | href="h ... le.com" | here |
|
||||
| tst.js:25:17:25:28 | id="theDiff" | This attribute is duplicated $@. | tst.js:25:30:25:41 | id="theDiff" | here |
|
||||
|
||||
@@ -20,3 +20,6 @@ var div2 = <div id="theDiff"></div>;
|
||||
|
||||
// not OK
|
||||
var div3 = <div><div id="theDiff"></div><div id="theDiff"></div></div>;
|
||||
|
||||
// not OK
|
||||
var div4 = <div id="theDiff" id="theDiff"></div>;
|
||||
|
||||
Reference in New Issue
Block a user