Merge pull request #17439 from tamasvajk/feature/include-razor-files-in-fromSource

C#: Include `.razor` files in `File::fromSource`
This commit is contained in:
Tamás Vajk
2024-09-12 13:14:34 +02:00
committed by GitHub
2 changed files with 2 additions and 2 deletions

View File

@@ -1,5 +1,5 @@
import csharp
from File f
where f.fromSource() or f.getExtension() = "cshtml"
where f.fromSource()
select f

View File

@@ -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()
}