Skip to content

Commit 9250c29

Browse files
authored
Merge pull request github#17439 from tamasvajk/feature/include-razor-files-in-fromSource
C#: Include `.razor` files in `File::fromSource`
2 parents a4c1ec7 + da3c5f4 commit 9250c29

File tree

2 files changed

+2
-2
lines changed
  • csharp/ql

2 files changed

+2
-2
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import csharp
22

33
from File f
4-
where f.fromSource() or f.getExtension() = "cshtml"
4+
where f.fromSource()
55
select f

csharp/ql/lib/semmle/code/csharp/File.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ class File extends Container, Impl::File {
6161

6262
/** Holds if this file contains source code. */
6363
final predicate fromSource() {
64-
this.getExtension() = ["cs", "cshtml"] and
64+
this.getExtension() = ["cs", "cshtml", "razor"] and
6565
not this.isStub()
6666
}
6767

0 commit comments

Comments
 (0)