mirror of
https://github.com/github/codeql.git
synced 2025-12-20 10:46:30 +01:00
Merge pull request #3834 from asger-semmle/js/vue-classification
Approved by erik-krogh
This commit is contained in:
@@ -80,6 +80,8 @@ predicate classify(File f, string category) {
|
|||||||
or
|
or
|
||||||
// Polymer templates
|
// Polymer templates
|
||||||
exists(HTML::Element elt | elt.getName() = "template" |
|
exists(HTML::Element elt | elt.getName() = "template" |
|
||||||
f = elt.getFile() and category = "template"
|
f = elt.getFile() and
|
||||||
|
category = "template" and
|
||||||
|
not f.getExtension() = "vue"
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -164,7 +164,10 @@ private int countStartingHtmlElements(File f, int l) {
|
|||||||
/**
|
/**
|
||||||
* Holds if the base name of `f` is a number followed by a single extension.
|
* Holds if the base name of `f` is a number followed by a single extension.
|
||||||
*/
|
*/
|
||||||
predicate isGeneratedFileName(File f) { f.getStem().regexpMatch("[0-9]+") }
|
predicate isGeneratedFileName(File f) {
|
||||||
|
f.getStem().regexpMatch("[0-9]+") and
|
||||||
|
not f.getExtension() = "vue"
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds if `tl` looks like it contains generated code.
|
* Holds if `tl` looks like it contains generated code.
|
||||||
|
|||||||
@@ -0,0 +1,6 @@
|
|||||||
|
<template>
|
||||||
|
<span>hey</span>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
export default { data: 42 }
|
||||||
|
</script>
|
||||||
Reference in New Issue
Block a user