How to use environnement variables inside Polyspace project configuration ?
Mostra commenti meno recenti
Hi,
I'm using Polyspace BugFinder in my company to do static analysis compliance with MISRA rules. I'm starting to use this software with the desktop version (no command line for now).
I wanted to create one project definition for all the developpers that will need to use a static analysis of their code. Since each of us have the source code repository at different location on our computer, we set an environment variable to retrieve those sources.
I tried to use this environment variable inside Polyspace but it doesn't work. My question is : is there a way to include sources/includes files path with an environment variable inside Polyspace BugFinder ?
Thanks
Risposta accettata
Più risposte (1)
Judy Zouaoui
il 22 Gen 2020
2 Commenti
Anirban
il 22 Gen 2020
Hi Judy,
The path is indeed absolute, but the absolute path is recomputed when you open the project in the Polyspace user interface (based on the current location of the project).
This means that in practice, you will see the following if you move the project (possibly along with sources) to a new location like you did:
- If you open the psprj file in a text editor, it still has the old path.
- If you open the project in the Polyspace user interface instead and navigate to the 'Source' folder and the sources inside on the Project Browser pane, you should see the paths to the new files. However, the .psprj file when opened in a text editor still shows the old path.
- Only when you start a new analysis from the user interface are these new locations written to the psprj file. So, now if you open the psprj file in a text editor, you should see the new paths.
The idea was that opening the psprj file directly in a text editor is something that is not recommended. So, all these things happen "behind the scenes" and if the user interacts with the project through the user interface only, the right things should happen.
Note that the recomputing of paths works in most cases but there are some corner cases where it might not work. If you don't see the change I am stating above, please contact MathWorks Technical Support: https://www.mathworks.com/support/contact_us.html
Judy Zouaoui
il 22 Gen 2020
Categorie
Scopri di più su Bug Finder Analysis on Clusters in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!