File tree Expand file tree Collapse file tree 2 files changed +2
-5
lines changed
python/ql/src/semmle/python Expand file tree Collapse file tree 2 files changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -74,7 +74,7 @@ class File extends Container {
74
74
string getContents ( ) { file_contents ( this , result ) }
75
75
76
76
/** Holds if this file is likely to get executed directly, and thus act as an entry point for execution. */
77
- predicate maybeExecutedDirectly ( ) {
77
+ predicate isPossibleEntryPoint ( ) {
78
78
// Only consider files in the source code, and not things like the standard library
79
79
exists ( this .getRelativePath ( ) ) and
80
80
(
@@ -148,9 +148,6 @@ class Folder extends Container {
148
148
this .getBaseName ( ) .regexpMatch ( "[^\\d\\W]\\w*" ) and
149
149
result = this .getParent ( ) .getImportRoot ( n )
150
150
}
151
-
152
- /** Holds if execution may start in a file in this directory. */
153
- predicate mayContainEntryPoint ( ) { any ( File f | f .getParent ( ) = this ) .maybeExecutedDirectly ( ) }
154
151
}
155
152
156
153
/**
Original file line number Diff line number Diff line change @@ -211,7 +211,7 @@ private predicate transitively_imported_from_entry_point(File file) {
211
211
importer .getParent ( ) = file .getParent ( ) and
212
212
exists ( ImportExpr i | i .getLocation ( ) .getFile ( ) = importer and i .getName ( ) = file .getStem ( ) )
213
213
|
214
- importer .maybeExecutedDirectly ( ) or transitively_imported_from_entry_point ( importer )
214
+ importer .isPossibleEntryPoint ( ) or transitively_imported_from_entry_point ( importer )
215
215
)
216
216
}
217
217
You can’t perform that action at this time.
0 commit comments