mirror of
https://github.com/github/codeql.git
synced 2026-04-26 09:15:12 +02:00
Ruby: Don't classify our test files as test files
For model editing purposes.
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user