mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
Merge pull request #17439 from tamasvajk/feature/include-razor-files-in-fromSource
C#: Include `.razor` files in `File::fromSource`
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import csharp
|
||||
|
||||
from File f
|
||||
where f.fromSource() or f.getExtension() = "cshtml"
|
||||
where f.fromSource()
|
||||
select f
|
||||
|
||||
@@ -61,7 +61,7 @@ class File extends Container, Impl::File {
|
||||
|
||||
/** Holds if this file contains source code. */
|
||||
final predicate fromSource() {
|
||||
this.getExtension() = ["cs", "cshtml"] and
|
||||
this.getExtension() = ["cs", "cshtml", "razor"] and
|
||||
not this.isStub()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user