mirror of
https://github.com/hohn/codeql-external-data.git
synced 2025-12-16 14:23:03 +01:00
19 lines
411 B
Plaintext
19 lines
411 B
Plaintext
/**
|
|
* @kind problem
|
|
* @id sample/read-external-data
|
|
*/
|
|
|
|
import cpp
|
|
import external.ExternalArtifact
|
|
|
|
class InfoSupplement extends ExternalData {
|
|
InfoSupplement() { this.getDataPath().matches("%/info-%.csv") }
|
|
|
|
int getId() { result = this.getFieldAsInt(0) }
|
|
|
|
string getName() { result = this.getField(1) }
|
|
}
|
|
|
|
from InfoSupplement d
|
|
select d.getDataPath(), "Found id:" + d.getId() + " name:" + d.getName()
|