@@ -28,7 +28,10 @@ module XPath {
28
28
*/
29
29
abstract class Range extends DataFlow:: Node { }
30
30
31
- /** An XPath expression string used in an API function of the https://github.com/antchfx/xpath package. */
31
+ /**
32
+ * An XPath expression string used in an API function of the
33
+ * [XPath](https://github.com/antchfx/xpath) package.
34
+ */
32
35
private class AntchfxXpathXPathExpressionString extends Range {
33
36
AntchfxXpathXPathExpressionString ( ) {
34
37
exists ( Function f , string name | name .matches ( "Compile%" ) |
@@ -48,7 +51,10 @@ module XPath {
48
51
}
49
52
}
50
53
51
- /** An XPath expression string used in an API function of the https://github.com/antchfx/htmlquery package. */
54
+ /**
55
+ * An XPath expression string used in an API function of the
56
+ * [htmlquery](https://github.com/antchfx/htmlquery) package.
57
+ */
52
58
private class AntchfxHtmlqueryXPathExpressionString extends Range {
53
59
AntchfxHtmlqueryXPathExpressionString ( ) {
54
60
exists ( Function f , string name | name .matches ( "Find%" ) |
@@ -63,7 +69,10 @@ module XPath {
63
69
}
64
70
}
65
71
66
- /** An XPath expression string used in an API function of the https://github.com/antchfx/xmlquery package. */
72
+ /**
73
+ * An XPath expression string used in an API function of the
74
+ * [xmlquery](https://github.com/antchfx/xmlquery) package.
75
+ */
67
76
private class AntchfxXmlqueryXPathExpressionString extends Range {
68
77
AntchfxXmlqueryXPathExpressionString ( ) {
69
78
exists ( Function f , string name | name .matches ( "Find%" ) |
@@ -83,7 +92,10 @@ module XPath {
83
92
}
84
93
}
85
94
86
- /** An XPath expression string used in an API function of the https://github.com/antchfx/jsonquery package. */
95
+ /**
96
+ * An XPath expression string used in an API function of the
97
+ * [jsonquery](https://github.com/antchfx/jsonquery) package.
98
+ */
87
99
private class AntchfxJsonqueryXPathExpressionString extends Range {
88
100
AntchfxJsonqueryXPathExpressionString ( ) {
89
101
exists ( Function f , string name | name .matches ( "Find%" ) |
@@ -98,22 +110,28 @@ module XPath {
98
110
}
99
111
}
100
112
101
- /** An XPath expression string used in an API function of the https://github.com/go-xmlpath/xmlpath package. */
113
+ /**
114
+ * An XPath expression string used in an API function of the
115
+ * [xmlpath](https://github.com/go-xmlpath/xmlpath) package.
116
+ */
102
117
private class GoXmlpathXmlpathXPathExpressionString extends Range {
103
118
GoXmlpathXmlpathXPathExpressionString ( ) {
104
119
exists ( Function f , string name | name .matches ( "Compile%" ) |
105
- f .hasQualifiedName ( package ( "github.com/go-xmlpath/xmlpath" , "" ) , name ) and
120
+ f .hasQualifiedName ( XmlPath :: packagePath ( ) , name ) and
106
121
this = f .getACall ( ) .getArgument ( 0 )
107
122
)
108
123
or
109
124
exists ( Function f , string name | name .matches ( "MustCompile%" ) |
110
- f .hasQualifiedName ( package ( "github.com/go-xmlpath/xmlpath" , "" ) , name ) and
125
+ f .hasQualifiedName ( XmlPath :: packagePath ( ) , name ) and
111
126
this = f .getACall ( ) .getArgument ( 0 )
112
127
)
113
128
}
114
129
}
115
130
116
- /** An XPath expression string used in an API function of the https://github.com/ChrisTrenkamp/goxpath package. */
131
+ /**
132
+ * An XPath expression string used in an API function of the
133
+ * [goxpath](https://github.com/ChrisTrenkamp/goxpath) package.
134
+ */
117
135
private class ChrisTrenkampGoxpathXPathExpressionString extends Range {
118
136
ChrisTrenkampGoxpathXPathExpressionString ( ) {
119
137
exists ( Function f , string name | name .matches ( "Parse%" ) |
@@ -128,7 +146,10 @@ module XPath {
128
146
}
129
147
}
130
148
131
- /** An XPath expression string used in an API function of the https://github.com/santhosh-tekuri/xpathparser package. */
149
+ /**
150
+ * An XPath expression string used in an API function of the
151
+ * [xpathparser](https://github.com/santhosh-tekuri/xpathparser) package.
152
+ */
132
153
private class SanthoshTekuriXpathparserXPathExpressionString extends Range {
133
154
SanthoshTekuriXpathparserXPathExpressionString ( ) {
134
155
exists ( Function f , string name | name .matches ( "Parse%" ) |
@@ -143,7 +164,10 @@ module XPath {
143
164
}
144
165
}
145
166
146
- /** An XPath expression string used in an API function of the https://github.com/jbowtie/gokogiri package. */
167
+ /**
168
+ * An XPath expression string used in an API function of the
169
+ * [gokogiri]https://github.com/jbowtie/gokogiri) package.
170
+ */
147
171
private class JbowtieGokogiriXPathExpressionString extends Range {
148
172
JbowtieGokogiriXPathExpressionString ( ) {
149
173
exists ( Function f , string name | name .matches ( "Compile%" ) |
@@ -164,3 +188,11 @@ module XPath {
164
188
}
165
189
}
166
190
}
191
+
192
+ module XmlPath {
193
+ /** Gets the package name `github.com/go-xmlpath/xmlpath` or `gopkg.in/xmlpath`. */
194
+ bindingset [ result ]
195
+ string packagePath ( ) {
196
+ result = package ( [ "github.com/go-xmlpath/xmlpath" , "gopkg.in/xmlpath" ] , "" )
197
+ }
198
+ }
0 commit comments