File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
go/ql/lib/semmle/go/dataflow Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -153,7 +153,10 @@ module ModelValidation {
153153 not part = "" and
154154 not ( part = "Argument" and pred = "sink" ) and
155155 not parseArg ( part , _) and
156- not part .getName ( ) = "Field"
156+ // If the database does not contain any fields/pointer types then no
157+ // FieldContent/PointerContent exists, so we spuriously think that
158+ // these spec components are invalid.
159+ not part .getName ( ) = [ "Field" , "Dereference" ]
157160 or
158161 part = input .getToken ( 0 ) and
159162 parseParam ( part , _)
@@ -176,7 +179,10 @@ module ModelValidation {
176179 invalidSpecComponent ( output , part ) and
177180 not part = "" and
178181 not ( part = [ "Argument" , "Parameter" ] and pred = "source" ) and
179- not part .getName ( ) = "Field"
182+ // If the database does not contain any fields/pointer types then no
183+ // FieldContent/PointerContent exists, so we spuriously think that
184+ // these spec components are invalid.
185+ not part .getName ( ) = [ "Field" , "Dereference" ]
180186 or
181187 invalidIndexComponent ( output , part )
182188 ) and
You can’t perform that action at this time.
0 commit comments