|
Relative imports in python and javascript or |
Replies: 2 comments 3 replies
|
During extraction, we follow As a rule of thumb, the extractor mostly concerns itself with making sure that all the relevant files have been extracted. Assigning a meaning to the things that have been extracted is mostly done in the CodeQL libraries. For instance, if a Python file starts with a As for whether this will cause issues, that really depends on the specific setup. |
Where can I get more clarity into this? I am currently analyzing large set of public github repos with CodeQL and wanted to do this precisely.
Oh, that's very interesting. I assume the same would happen for javascript
Thanks, I understand now why two independent folders can be connected. I was doing even worse thing (running codeql on bunch of independent repositories together. Discussion #477 ). |
During extraction, we follow
importstatements using the machinery that Python provides. This means that changes tosys.pathmay not be detected, depending on where and how they are applied.As a rule of thumb, the extractor mostly concerns itself with making sure that all the relevant files have been extracted. Assigning a meaning to the things that have been extracted is mostly done in the CodeQL libraries. For instance, if a Python file starts with a
#! /usr/bin/pythonline, then we treat it as if it is an entry point, and modify things like module names accordingly. In some cases this may result in a module having multiple distinct names, depending on which entry point is used during …