mirror of
https://github.com/github/codeql.git
synced 2026-04-22 23:35:14 +02:00
inline Location into the shared implementation of InlineExpectationsTest
This commit is contained in:
@@ -3,20 +3,18 @@
|
||||
* See `shared/util/codeql/util/test/InlineExpectationsTest.qll`
|
||||
*/
|
||||
|
||||
private import codeql.ruby.AST as R
|
||||
private import codeql.util.test.InlineExpectationsTest
|
||||
private import codeql.ruby.ast.internal.TreeSitter
|
||||
|
||||
private module Impl implements InlineExpectationsTestSig {
|
||||
private import codeql.ruby.ast.internal.TreeSitter
|
||||
/**
|
||||
* A class representing line comments in Ruby.
|
||||
*/
|
||||
private class ExpectationComment extends Ruby::Comment {
|
||||
string getContents() { result = this.getValue().suffix(1) }
|
||||
|
||||
/**
|
||||
* A class representing line comments in Ruby.
|
||||
*/
|
||||
class ExpectationComment extends Ruby::Comment {
|
||||
string getContents() { result = this.getValue().suffix(1) }
|
||||
predicate hasLocationInfo(string file, int line, int column, int endLine, int endColumn) {
|
||||
this.getLocation().hasLocationInfo(file, line, column, endLine, endColumn)
|
||||
}
|
||||
|
||||
class Location = R::Location;
|
||||
}
|
||||
|
||||
import Make<Impl>
|
||||
import Make<ExpectationComment>
|
||||
|
||||
Reference in New Issue
Block a user