Welcome to our new forum
All users of the legacy CODESYS Forums, please create a new account at account.codesys.com. But make sure to use the same E-Mail address as in the old Forum. Then your posts will be matched.
Close
I'm using CODESYS 3.5 SP16 Patch 6. I would like to incorporate static code analysis as part of our CI/CD pipeline.
1. Is there a way to execute the static code check from the command line or python script?
2. If you can't do it from the command line, is there a way to export the results from the application?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
For the 2nd Option: You'll need to ensure that in the Static Analysis Settings, the option "Perform static analysis automatically after compilation" is checked.
# get Project values
myProject = projects.primary
# Creates an active application
app = myProject.active_application
# build Application and run static code analysis
app.generate_code()
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm using CODESYS 3.5 SP16 Patch 6. I would like to incorporate static code analysis as part of our CI/CD pipeline.
1. Is there a way to execute the static code check from the command line or python script?
2. If you can't do it from the command line, is there a way to export the results from the application?
I've already experimented with two methods, but unfortunately, they only function with projects of type *.project. Consequently, when executing:
For the 2nd Option: You'll need to ensure that in the Static Analysis Settings, the option "Perform static analysis automatically after compilation" is checked.
The Solution.
For Projects:
For Libraries:
Last edit: k4zz 2024-03-20