Thresholds help your team uphold quality standards by clearly defining acceptable limits for issues and test coverage. By setting these limits, you create a shared expectation around code quality and testing discipline. With a simple configuration, Codeac can visually and functionally enforce these rules, helping you keep your project clean, stable, and maintainable over time.
Taking your issues seriously is very beneficial in long term to keep your project nice and clean. By adding a small configuration to your repository you can leverage a visual and functional threshold in Codeac.
You can define the maximum number of errors or total issues that are acceptable for your team simply by adding .codeac.yml
file into the root of your repository. Codeac will then interpret your limits in the user interface and give you visual feedback when you are violating those limits.
When the number of issues is lower than the threshold, Codeac will signal a success state to your GIT provider. If you violate any of the thresholds Codeac will signal a fail state instead. If the threshold is not specified, Codeac will signal a success to all commits with finished analysis. The failed state is used only when the whole analysis fails, for example with configuration issues or other errors.
The Code Coverage Thresholds feature is currently in beta testing.
Code coverage is a metric that shows what percentage of your codebase is executed when running tests. When your tests include meaningful assertions, you can be more confident that things work and that future changes won’t break anything unexpectedly.
By specifying a minimum coverage threshold in your .codeac.yml
, you can ensure that your team maintains an acceptable level of test coverage. If the coverage drops below this threshold, Codeac will mark the analysis as failed.
In this example, Codeac requires at least 70% code coverage for branches, 75% for functions and 80% for lines. If your test coverage is equal to or higher than those values, Codeac will report a success. If coverage drops below the threshold, Codeac will report a fail state.
GitHub interprets commit states very clearly right next to each commit date. By clicking on the state you can get more information about the specific analysis.
Codeac is listed as one of the Continuous Integration builds in the commit. By clicking on the build you will be taken to the detail of the analysis where you can inspect all the issues.
Commit states are interpreted very clearly right next to each commit message. By clicking on the state you can get more information about the specific build.
Codeac is listed as one of the CI builds in the commit. By clicking on the build you will be taken to the detail of the analysis where you can inspect all the issues.
Commit states are interpreted very clearly right next to each commit message. By clicking on the state you can get more information about the specific build.
Codeac is listed as one of the CI builds in the commit. By clicking on the build you will be taken to the detail of the analysis where you can inspect all the issues.