Skip to content

Commit

Permalink
Merge pull request #5749 from tamasvajk/feature/fix-fromsource
Browse files Browse the repository at this point in the history
C#: Adjust 'fromSource' to hold only on files passed to the compiler as a source file
  • Loading branch information
tamasvajk authored Apr 23, 2021
2 parents 6f2103f + ed42c87 commit c3058f4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion csharp/ql/src/semmle/code/csharp/File.qll
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ class File extends Container, @file {
override string getURL() { result = "file://" + this.getAbsolutePath() + ":0:0:0:0" }

/** Holds if this file contains source code. */
predicate fromSource() { this.getNumberOfLinesOfCode() > 0 }
predicate fromSource() { files(this, _, _, "cs", _) }

/** Holds if this file is a library. */
predicate fromLibrary() {
Expand Down

0 comments on commit c3058f4

Please sign in to comment.