How to Block a Merge to a Branch if SoftaCheck Analysis Fails?
You can make sure that every time someone makes a pull request to a specific branch (or a set of branches), SoftaCheck must pass in order to be able to do the merge.
First, add SoftaCheck to your repository.
Then, setup your targeted branch (or branches) as protected. In GitHub this can be done by going to your repository and there go to settings –> Branches –> Branch protection rules –> Add rule
then in the “branch name pattern” write the branch to which you want this to apply (you can use * to make the rule apply to a group of branches with similar names. e.g. “Test*” would apply to “Test1” and “Test2” assuming you have such branch names).
Then select “Require pull request reviews before merging”
Then select “Require status checks to pass before merging” and select “SoftaCheck”.
If you want to enforce the rule also on yourself as an administrator then mark also “Include administrators”
Then click “Save Changes”
Now, you won’t be able to push to that branch without doing a pull request and passing the analysis by SoftaCheck. Moreover, no one would be able to mess with your protected branch (or branches) without verifying that the SoftaCheck analysis passed.
How to Setup SoftaCheck to Run on Every Pull Request?
Once you add SoftaCheck to your repository it is automatically run on every pull request.
Does SoftaCheck static analysis support Misra C standard?
Under CppCheck, one of the static analysis tools SoftaCheck uses, there is support for Misra C standard 2012.
What kind of static analysis tools does SoftaCheck use?
SoftaCheck uses open-source tools such as CppCheck and Clang-Tidy to analyze C/C++ code.
If will only analyze source files such as ‘.h’, ‘.c’ and ‘.cpp’ files.
All other files shall be ignored.
Automatic Code Documentation Generation
Does the auto generated documentation get erased with each new pull request?
No. It does not get erased. SoftaCheck maintains previous versions of the documentation for your reference. For each new pull request, the documentation is regenerated and given a unique link address that is different than the previous versions.
How does the automatic code documentation generation work?
SoftaCheck uses an open-source tool called Doxygen. It runs it automatically on your code.
When SoftaCheck analysis is done, you can check your pull request page and a link shall appear under the SoftaCheck check page.
The link will take you to the documentation of your code that has been generated using Doxygen.
Only people with access to your repository will have access to the documentation and this is enforced by checking your GitHub credentials upon accessing the documentation. If you have cookies enabled in your browser, you won’t be asked to enter your credentials again after the first time you did so.