GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Add model validation for constructor summary models · github/codeql@63e8061

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • cpp/ql/lib/semmle/code/cpp/dataflow
    • ExternalFlow.qll
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎cpp/ql/lib/semmle/code/cpp/dataflow/ExternalFlow.qll‎

Copy file name to clipboardExpand all lines: cpp/ql/lib/semmle/code/cpp/dataflow/ExternalFlow.qll
+15-1Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,12 +353,26 @@ module CsvValidation {
353353
)
354354
}
355355

356+
string getIncorrectConstructorSummaryOutput() {
357+
exists(string namespace, string type, string name, string output |
358+
type = name or
359+
type = name + "<" + any(string s)
360+
|
361+
summaryModel(namespace, type, _, name, _, _, _, output, _, _, _) and
362+
output.matches("ReturnValue%") and
363+
result =
364+
"Constructor model for " + namespace + "." + type +
365+
" should use `Argument[-1]` in the output, not `ReturnValue`."
366+
)
367+
}
368+
356369
/** Holds if some row in a CSV-based flow model appears to contain typos. */
357370
query predicate invalidModelRow(string msg) {
358371
msg =
359372
[
360373
getInvalidModelSignature(), getInvalidModelInput(), getInvalidModelOutput(),
361-
getInvalidModelSubtype(), getInvalidModelColumnCount(), KindVal::getInvalidModelKind()
374+
getInvalidModelSubtype(), getInvalidModelColumnCount(), KindVal::getInvalidModelKind(),
375+
getIncorrectConstructorSummaryOutput()
362376
]
363377
}
364378
}

0 commit comments

Comments
0 (0)
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.