Skip to content

Commit da3c5f4

Browse files
committed
C#: Include .razor files in File::fromSource
1 parent d374935 commit da3c5f4

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)