|
| 1 | +--- |
| 2 | +# Questions for code quality features |
| 3 | + |
| 4 | +# the main menu |
| 5 | +SelectCodeQualityFeatures: |
| 6 | + when: "{{ template_profile != 'minimum' }}" |
| 7 | + type: yaml |
| 8 | + default: |- |
| 9 | + {% if template_profile == 'recommended' %} |
| 10 | + [SelectGitHubActions_flag, not_implemented_linting, AddSonarCloud_flag, AddEditorConfig_flag] |
| 11 | + {%- else -%} |
| 12 | + [] |
| 13 | + {%- endif %} |
| 14 | + help: Select code quality features |
| 15 | + multiselect: true |
| 16 | + choices: |
| 17 | + GitHub Actions: |
| 18 | + value: SelectGitHubActions_flag |
| 19 | + # validator: "{% if something != 'AnotherThing' %}BlaBla{% endif %}" |
| 20 | + Linting (using ruff NOT_IMPLEMENTED): |
| 21 | + value: not_implemented_linting |
| 22 | + # validator: "{% if something != 'AnotherThing' %}BlaBla{% endif %}" |
| 23 | + Pre-commit: |
| 24 | + value: AddPreCommit_flag |
| 25 | + # validator: "{% if something != 'AnotherThing' %}BlaBla{% endif %}" |
| 26 | + Code analysis (using SonarCloud): |
| 27 | + value: AddSonarCloud_flag |
| 28 | + # validator: "{% if something != 'AnotherThing' %}BlaBla{% endif %}" |
| 29 | + Editorconfig: |
| 30 | + value: AddEditorConfig_flag |
| 31 | + # validator: "{% if something != 'AnotherThing' %}BlaBla{% endif %}" |
| 32 | + |
| 33 | + |
| 34 | +# Sub-menus |
| 35 | +SelectGitHubActions: |
| 36 | + when: "{{ 'SelectGitHubActions_flag' in SelectCodeQualityFeatures }}" |
| 37 | + type: yaml |
| 38 | + default: |- |
| 39 | + {% if template_profile == 'recommended' %} |
| 40 | + [AddGitHubActionBuild_flag, AddGitHubActionDocumentation_flag] |
| 41 | + {%- else -%} |
| 42 | + [] |
| 43 | + {%- endif %} |
| 44 | + help: Select GitHub Action workflows |
| 45 | + multiselect: true |
| 46 | + choices: |
| 47 | + Build: |
| 48 | + value: AddGitHubActionBuild_flag |
| 49 | + # validator: "{% if something != 'AnotherThing' %}BlaBla{% endif %}" |
| 50 | + Documentation: |
| 51 | + value: AddGitHubActionDocumentation_flag |
| 52 | + # validator: "{% if something != 'AnotherThing' %}BlaBla{% endif %}" |
| 53 | + Link checker (reports broken URLs): |
| 54 | + value: AddLinkCheck_flag |
| 55 | + # validator: "{% if something != 'AnotherThing' %}BlaBla{% endif %}" |
| 56 | + |
| 57 | + |
| 58 | +# computed features |
| 59 | +AddGitHubActionBuild: |
| 60 | + type: bool |
| 61 | + default: "{{ 'AddGitHubActionBuild_flag' in SelectGitHubActions }}" |
| 62 | + when: false |
| 63 | + |
| 64 | +AddGitHubActionDocumentation: |
| 65 | + type: bool |
| 66 | + default: "{{ 'AddGitHubActionDocumentation_flag' in SelectGitHubActions }}" |
| 67 | + when: false |
| 68 | + |
| 69 | +AddLinkCheck: |
| 70 | + type: bool |
| 71 | + default: "{{ 'AddLinkCheck_flag' in SelectGitHubActions }}" |
| 72 | + when: false |
| 73 | + |
| 74 | +AddPreCommit: |
| 75 | + type: bool |
| 76 | + default: "{{ 'AddPreCommit_flag' in SelectCodeQualityFeatures }}" |
| 77 | + when: false |
| 78 | + |
| 79 | +AddSonarCloud: |
| 80 | + type: bool |
| 81 | + default: "{{ 'AddSonarCloud_flag' in SelectCodeQualityFeatures }}" |
| 82 | + when: false |
| 83 | + |
| 84 | +AddEditorConfig: |
| 85 | + type: bool |
| 86 | + default: "{{ 'AddEditorConfig_flag' in SelectCodeQualityFeatures }}" |
| 87 | + when: false |
0 commit comments