Skip to content

Commit ccbbad0

Browse files
themr0cclaude
andauthored
[RHIDP-12787]: Add local SonarCloud lint script and fix remaining CQA errors (#1950)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent c4a882f commit ccbbad0

170 files changed

Lines changed: 910 additions & 500 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.claude/skills/cqa-05-modular-elements-checklist.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,27 @@ Work through each checkbox in the checklist for thorough validation.
134134
| **PROCEDURE with custom blocks** | `.Installation steps` | Use `.Procedure` |
135135
| **CONCEPT with numbered steps** | 1. Do this<br>2. Do that | Move to PROCEDURE module |
136136

137+
### Fixing non-standard block titles
138+
139+
Non-standard block titles (`.Example XYZ`, `.Sample config`, `.Available props`, etc.) are the most common CQA-05 violation. The fix depends on context:
140+
141+
1. **If surrounding text already describes the block** → just delete the `.Title` line entirely. The preceding paragraph provides sufficient context.
142+
2. **If no surrounding context exists** → convert the block title to a lead-in sentence before the block (without the dot prefix). For example, `.Example creating many PVCs` becomes `For example, to create many PVCs:`.
143+
3. **Never replace one non-standard title with another** (e.g., don't change `.Helm config excerpt` to `.Example``.Example` is also non-standard).
144+
4. **The script may only report the first violation per file.** Always scan the entire file for ALL `.Title` lines and fix them all.
145+
146+
### Creating assemblies for inline content
147+
148+
When a title `master.adoc` contains `== Section` headings with `leveloffset=+2` includes, extract them into proper nested assemblies:
149+
150+
1. Create the assembly in `assemblies/<category>_<title>/assembly-<section-name>.adoc`
151+
2. **Use relative include paths**: `include::../modules/shared/...` (relative to the assembly directory), NOT `include::modules/shared/...` (relative to repo root)
152+
3. Add context save/restore boilerplate (`ifdef::context[:parent-context: {context}]` at top, restore at bottom)
153+
4. Change includes from `leveloffset=+2` to `leveloffset=+1` in the assembly
154+
5. In the title, replace the `==` section with `include::assemblies/.../assembly-....adoc[leveloffset=+1]`
155+
156+
Similarly, if a title has inline content (paragraphs, lists) beyond the `[role="_abstract"]` introduction, extract it into a concept module.
157+
137158
## Validation Workflow
138159

139160
1. **Run content type validation:**

.claude/skills/cqa-13-information-is-conveyed-using-the-correct-content.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ While RHDH documentation primarily uses Product documentation with modular struc
8989
- Validates PROCEDURE files have `.Procedure` section with steps
9090
- Validates CONCEPT files do not have `.Procedure` sections
9191
- Validates REFERENCE files do not have `.Procedure` sections
92-
- Validates ASSEMBLY files contain only intro + includes
92+
- Validates ASSEMBLY files have `include::` directives (no includes = wrong content type)
9393
- Checks filename prefix matches content type (proc-, con-, ref-, assembly-)
9494

9595
**Target Results:**

.github/workflows/content-quality-assessment.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,10 +136,8 @@ jobs:
136136
const cqaOutput = process.env.CQA_OUTPUT;
137137
138138
let comment = '## Content Quality Assessment Results\n\n';
139-
comment += '```\n';
140139
comment += cqaOutput;
141-
comment += '\n```\n\n';
142-
comment += '---\n';
140+
comment += '\n\n---\n';
143141
comment += '*Automated CQA check run on the entire repository*\n';
144142
145143
// Find existing CQA comment and update or create

.vscode/settings.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
"pipelineruns",
2424
"podman",
2525
"preconfigured",
26+
"previouscontext",
2627
"quicklinks",
2728
"redhat",
2829
"rhcr",
@@ -36,9 +37,14 @@
3637
"sysparam",
3738
"sysparm",
3839
"taskruns",
40+
"techdocs",
3941
"tekton",
4042
"umoci",
4143
"virtualmachineinstances",
4244
"virtualmachines"
43-
]
45+
],
46+
"sonarlint.connectedMode.project": {
47+
"connectionId": "redhat-developer",
48+
"projectKey": "redhat-developer_red-hat-developers-documentation-rhdh"
49+
}
4450
}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
:_mod-docs-content-type: ASSEMBLY
2+
ifdef::context[:parent-context: {context}]
3+
4+
[id="customize-rhdh-navigation_{context}"]
5+
= Customize {product} navigation
6+
7+
:previouscontext: {context}
8+
:context: customize-rhdh-navigation
9+
10+
[role="_abstract"]
11+
You can customize navigation elements in {product}, including sidebar menu items, entity tab titles, and entity detail tab layouts.
12+
13+
include::../modules/shared/con-sidebar-menu-items.adoc[leveloffset=+1]
14+
15+
include::../modules/shared/proc-customize-the-sidebar-menu-items-for-your-rhdh-instance.adoc[leveloffset=+2]
16+
17+
include::../modules/shared/proc-enable-sidebar-menu-items-localization-in-rhdh.adoc[leveloffset=+2]
18+
19+
include::../modules/shared/proc-configure-a-dynamic-plugin-menu-item-for-your-rhdh-instance.adoc[leveloffset=+2]
20+
21+
include::../modules/shared/proc-modify-or-add-a-custom-menu-items-for-your-rhdh-instance.adoc[leveloffset=+2]
22+
23+
include::../modules/shared/proc-configure-entity-tab-titles.adoc[leveloffset=+1]
24+
25+
include::../modules/shared/proc-configure-entity-detail-tab-layout.adoc[leveloffset=+1]
26+
27+
:context: {previouscontext}
28+
:!previouscontext:
29+
30+
ifdef::parent-context[:context: {parent-context}]
31+
ifndef::parent-context[:!context:]

assemblies/configure_customizing-rhdh/assembly-customize-rhdh-appearance.adoc renamed to assemblies/configure_customizing-rhdh/assembly-customize-rhdh-theme-and-branding.adoc

Lines changed: 3 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
:_mod-docs-content-type: ASSEMBLY
22
ifdef::context[:parent-context: {context}]
33

4-
[id="customize-rhdh-appearance_{context}"]
5-
= Customize {product} appearance
4+
[id="customize-rhdh-theme-and-branding_{context}"]
5+
= Customize {product} theme and branding
66

77
:previouscontext: {context}
8-
:context: customize-rhdh-appearance
8+
:context: customize-rhdh-theme-and-branding
99

1010
[role="_abstract"]
1111
By modifying the visual aspects of the interface, organizations can align {product} with their branding guidelines and improve the overall user experience.
@@ -28,38 +28,16 @@ You can also customize some components from the {product-short} GUI, such as the
2828

2929
include::../modules/shared/proc-switch-the-theme-mode-for-your-rhdh-instance.adoc[leveloffset=+1]
3030

31-
3231
include::../modules/shared/proc-customize-the-branding-logo-of-your-rhdh-instance.adoc[leveloffset=+1]
3332

34-
35-
include::../modules/shared/con-sidebar-menu-items.adoc[leveloffset=+1]
36-
37-
include::../modules/shared/proc-customize-the-sidebar-menu-items-for-your-rhdh-instance.adoc[leveloffset=+2]
38-
39-
include::../modules/shared/proc-enable-sidebar-menu-items-localization-in-rhdh.adoc[leveloffset=+2]
40-
41-
include::../modules/shared/proc-configure-a-dynamic-plugin-menu-item-for-your-rhdh-instance.adoc[leveloffset=+2]
42-
43-
include::../modules/shared/proc-modify-or-add-a-custom-menu-items-for-your-rhdh-instance.adoc[leveloffset=+2]
44-
45-
include::../modules/shared/proc-configure-entity-tab-titles.adoc[leveloffset=+1]
46-
47-
48-
include::../modules/shared/proc-configure-entity-detail-tab-layout.adoc[leveloffset=+1]
49-
50-
5133
include::../modules/shared/proc-customize-the-theme-mode-color-palettes-for-your-rhdh-instance.adoc[leveloffset=+1]
5234

53-
5435
include::../modules/shared/proc-customize-the-page-theme-header-for-your-rhdh-instance.adoc[leveloffset=+1]
5536

56-
5737
include::../modules/shared/proc-customize-the-font-for-your-rhdh-instance.adoc[leveloffset=+1]
5838

59-
6039
include::../modules/shared/ref-default-rhdh-theme.adoc[leveloffset=+1]
6140

62-
6341
include::../modules/shared/ref-default-theme.adoc[leveloffset=+1]
6442

6543
include::../modules/shared/proc-load-a-custom-rhdh-theme-by-using-a-dynamic-plugin.adoc[leveloffset=+1]

assemblies/extend_configuring-dynamic-plugins/assembly-configure-rhdh-events-module.adoc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
:_mod-docs-content-type: ASSEMBLY
2+
ifdef::context[:parent-context: {context}]
23

34
[id="configure-rhdh-events-module_{context}"]
45

@@ -11,3 +12,6 @@ You can enable real-time updates for GitHub entities by configuring the Events M
1112
include::{docdir}/artifacts/snip-technology-preview.adoc[]
1213

1314
include::../modules/shared/proc-configure-the-github-events-module-plugin.adoc[leveloffset=+1]
15+
16+
ifdef::parent-context[:context: {parent-context}]
17+
ifndef::parent-context[:!context:]

assemblies/extend_configuring-dynamic-plugins/assembly-configure-the-topology-plugin.adoc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
:_mod-docs-content-type: ASSEMBLY
2+
ifdef::context[:parent-context: {context}]
23

34
[id="configure-the-topology-plugin_{context}"]
45
= Configure the Topology plugin
@@ -16,3 +17,6 @@ include::../modules/shared/proc-view-tekton-pipelineruns.adoc[leveloffset=+1]
1617
include::../modules/shared/proc-view-virtual-machines.adoc[leveloffset=+1]
1718

1819
include::../modules/shared/proc-enable-the-source-code-editor.adoc[leveloffset=+1]
20+
21+
ifdef::parent-context[:context: {parent-context}]
22+
ifndef::parent-context[:!context:]

assemblies/extend_configuring-dynamic-plugins/assembly-enable-and-configure-the-jfrog-plugin.adoc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
:_mod-docs-content-type: ASSEMBLY
2+
ifdef::context[:parent-context: {context}]
23

34
[id="enable-and-configure-the-jfrog-plugin_{context}"]
45
= Enable and configure the JFrog plugin
@@ -10,3 +11,6 @@ Enable and configure the JFrog Artifactory plugin to display container images fr
1011
include::../modules/shared/proc-enable-the-jfrog-artifactory-plugin.adoc[leveloffset=+1]
1112

1213
include::../modules/shared/proc-configure-the-jfrog-artifactory-plugin.adoc[leveloffset=+1]
14+
15+
ifdef::parent-context[:context: {parent-context}]
16+
ifndef::parent-context[:!context:]

assemblies/extend_configuring-dynamic-plugins/assembly-enable-and-configure-the-keycloak-plugin.adoc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
:_mod-docs-content-type: ASSEMBLY
2+
ifdef::context[:parent-context: {context}]
23

34
[id="enable-and-configure-the-keycloak-plugin_{context}"]
45
= Enable and configure the Keycloak plugin
@@ -12,3 +13,6 @@ include::../modules/shared/proc-enable-the-keycloak-plugin.adoc[leveloffset=+1]
1213
include::../modules/shared/proc-configure-the-keycloak-plugin.adoc[leveloffset=+1]
1314

1415
include::../modules/shared/ref-keycloak-plugin-metrics.adoc[leveloffset=+1]
16+
17+
ifdef::parent-context[:context: {parent-context}]
18+
ifndef::parent-context[:!context:]

0 commit comments

Comments
 (0)