Skip to content

Commit b9d15ba

Browse files
committed
Ruby: Don't classify our test files as test files
For model editing purposes.
1 parent 064b10a commit b9d15ba

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

ruby/ql/src/utils/modeleditor/ModelEditor.qll

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,10 @@ string methodClassification(Call method) {
132132
}
133133

134134
class TestFile extends File {
135-
TestFile() { this.getRelativePath().regexpMatch(".*(test|spec).+") }
135+
TestFile() {
136+
this.getRelativePath().regexpMatch(".*(test|spec).+") and
137+
not this.getAbsolutePath().matches("%/ql/test/%") // allows our test cases to work
138+
}
136139
}
137140

138141
/**

0 commit comments

Comments
 (0)