JetBrains / Qodana

📝 Source repository of Qodana Help
https://www.jetbrains.com/help/qodana
Apache License 2.0
389 stars 63 forks source link

Define the value of some constants #32

Closed andreasciamanna closed 3 years ago

andreasciamanna commented 3 years ago

I've just given a shot to this tool, and it looks very promising.

One thing though it is skewing the results.

The code I'm analysing relies on the definition of a bunch of constants that are defined dynamically.

For instance, the project's root path, which is a WordPress plugin, is stored in a constant.

Code analysis will show a bunch of Can't resolve target of expression 'path/to/core/...'.

For instance, include MY_PLUGIN_PATH . '/some-cript.php'; will report Can't resolve target of expression 'path/to/core/some-cript.php'.

I assume path/to/core is added by Qodana because this string is nowhere in my code.

Is it possible to define the value of these constants in the YAML file?

For instance, the value of MY_PLUGIN_PATH would be ./ (I'm running the analysis from GitLab CI).

a-kuznetsova commented 3 years ago

Hi @andreasciamanna,

Thank you for reporting this. I have created an issue QD-773 in our issue tracker.

Please be informed that the Github Issues section in this repository will be disabled as of April 5, 2021. If you would like to be notified about the issue updates, add yourself as a watcher for the issue QD-773.