Skip to content

Commit c8ac5ea

Browse files
committed
render sonarcloud-related text conditionally
1 parent 7ee2fc6 commit c8ac5ea

3 files changed

Lines changed: 7 additions & 1 deletion

File tree

profiles.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
- project_setup.md
2323

2424
- code quality:
25-
- sonarcloud
25+
- sonarcloud #515
2626
- ruff and lint workflow
2727
- github action to build (exist) #451
2828
- pre-commit

template/README.md.jinja

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,10 @@
1111
| (5/5) checklist | [![workflow cii badge](https://bestpractices.coreinfrastructure.org/projects/<replace-with-created-project-identifier>/badge)](https://bestpractices.coreinfrastructure.org/projects/<replace-with-created-project-identifier>) |
1212
| howfairis | [![fair-software badge](https://img.shields.io/badge/fair--software.eu-%E2%97%8F%20%20%E2%97%8F%20%20%E2%97%8F%20%20%E2%97%8F%20%20%E2%97%8B-yellow)](https://fair-software.eu) |
1313
| **Other best practices** | &nbsp; |
14+
{% if AddSonarCloud -%}
1415
| Static analysis | [![workflow scq badge](https://sonarcloud.io/api/project_badges/measure?project={{github_organization}}_{{package_name}}&metric=alert_status)](https://sonarcloud.io/dashboard?id={{github_organization}}_{{package_name}}) |
1516
| Coverage | [![workflow scc badge](https://sonarcloud.io/api/project_badges/measure?project={{github_organization}}_{{package_name}}&metric=coverage)](https://sonarcloud.io/dashboard?id={{github_organization}}_{{package_name}}) |
17+
{%- endif -%}
1618
{% if AddOnlineDocumentation -%}
1719
| Documentation | [![Documentation Status](https://readthedocs.org/projects/{{package_name}}/badge/?version=latest)](https://{{package_name}}.readthedocs.io/en/latest/?badge=latest) |
1820
{%- endif -%}
@@ -21,7 +23,9 @@
2123
{% if AddCitation -%}
2224
| Citation data consistency | [![cffconvert]({{repository_url}}/actions/workflows/cffconvert.yml/badge.svg)]({{repository_url}}/actions/workflows/cffconvert.yml) |
2325
{%- endif -%}
26+
{% if AddSonarCloud -%}
2427
| SonarCloud | [![sonarcloud]({{repository_url}}/actions/workflows/sonarcloud.yml/badge.svg)]({{repository_url}}/actions/workflows/sonarcloud.yml) |
28+
{%- endif -%}
2529
| MarkDown link checker | [![markdown-link-check]({{repository_url}}/actions/workflows/markdown-link-check.yml/badge.svg)]({{repository_url}}/actions/workflows/markdown-link-check.yml) |
2630

2731
## How to use {{ package_name }}

template/project_setup.md.jinja

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,14 @@ help you decide which tool to use for packaging.
6666

6767
- [Relevant section in the NLeSC guide](https://guide.esciencecenter.nl/#/best_practices/language_guides/python?id=coding-style-conventions) and [README.dev.md](README.dev.md).
6868

69+
{% if AddSonarCloud -%}
6970
## Continuous code quality
7071

7172
[Sonarcloud](https://sonarcloud.io/) is used to perform quality analysis and code coverage report
7273

7374
- `sonar-project.properties` is the SonarCloud [configuration](https://docs.sonarqube.org/latest/analysis/analysis-parameters/) file
7475
- `.github/workflows/sonarcloud.yml` is the GitHub action workflow which performs the SonarCloud analysis
76+
{%- endif -%}
7577

7678
## Package version number
7779

0 commit comments

Comments
 (0)