Ruby: Don't classify our test files as test files

For model editing purposes.
This commit is contained in:
Harry Maclean
2023-11-03 11:06:13 +00:00
parent 064b10a5cb
commit b9d15bacba

View File

@@ -132,7 +132,10 @@ string methodClassification(Call method) {
}
class TestFile extends File {
TestFile() { this.getRelativePath().regexpMatch(".*(test|spec).+") }
TestFile() {
this.getRelativePath().regexpMatch(".*(test|spec).+") and
not this.getAbsolutePath().matches("%/ql/test/%") // allows our test cases to work
}
}
/**