Closed jiezhuzzz closed 1 month ago
It works as expected. If you try to joern-parse
a .java
file with --language newc
you will end up with a mostly empty CPG because c2cpg
wont touch any .java
file. Thats why your dot files are different.
The --language
flag itself selects the frontend to run but that frontend will only handle files related to the language.
Understood, thanks for your reply! I thought that could be a bug rather than a default behavior.
Describe the bug
--language <value>
option injoern-parse
is useless.joern-parse
will stick to file extension when parsing files.To Reproduce Steps to reproduce the behavior:
code.c
joern-parse --language newc code.c
andjoern-export --repr all -o withc
mv code.c code.java
. Export graph as before:joern-parse --language newc code.java
, andjoern-export --repr all -o withjava
Expected behavior
joern-parse
will ignore the file extension and use--language
to determine which frontend to be invoked.Desktop (please complete the following information):