This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

How to prevent disabling CODAN (Code Analysis) automatically upon importing a CCS Project



I noticed that when importing CCS projects, CODAN is automatically disabled (org.eclipse.cdt.codan.core.prefs in .settings folder inEditor=false and onBuild=false). CODAN has been quite useful to us and it is convenient to have enabled, even if we have to suppress CODAN sometimes. Is there a way to prevent this automatic disable? Code Composer version used is 10.2.0.00009. Thanks.

  • Hello,

    As you noticed, CODAN is disabled by default. It generates too many false positives for many TI based examples and hence causes confusion. There is not a way to reverse this behavior.

    Thanks

    ki

  • This is unfortunate.

  • I don't see this behaviour.

    I have 'Use project settings' selected.

    And I commit org.eclipse.cdt.codan.core.prefs the .settings folder of the project to our VCS.

    When I import the project into a fresh workspace, CODAN is enabled with the settings specified.

  • Kier I have the same settings but CODAN is disabled each time I re-import my project to CCS. Under project Properties > C/C++ General > Code Analysis > "Use project settings" is already enabled.

  • My mistake, I get the problem now. My only suggestion is to:

    - Make the prefs file read only.

    - Hit No when you import the project. You won't be asked again.

    - Close and Reopen the workspace. The onBuild flag should remain set and effective.

    However, it's not very robust since it's difficult to enforce the read only flag and most uninformed people will click Yes anyway! You might as well enforce activation of CODAN by work instruction.

    The other option is to make the workspace part of your VCS commit such that import of a project is no longer necessary. You just open the workspace. But this could be a maintenance nightmare.

  • Kier,

    Appreciate your suggestion. I'm not sure it's possible to enforce read-only file permissions within our Git repository, but certainly if I had a local project it would be possible to do it this way. Looks like this is a limitation of CCS.

    Thanks.