You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: scripts/README.adoc
+19-9Lines changed: 19 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,26 +13,36 @@ This script generates the _auto-index.adoc_ file by using the template in _templ
13
13
14
14
What it does::
15
15
* Extracts error codes from filenames (e.g., 42007.adoc → 42007).
16
-
Extracts the status descriptions from individual error files.
16
+
* Extracts the status descriptions from individual error files.
17
17
* Extracts page roles from files (`:page-role: changed-2025.04`).
18
18
* Creates a new _auto-index.adoc_ file based on the template and populates it with the extracted data.
19
19
20
-
=== `validate_error_index.py`
20
+
=== `validate-error-index.py`
21
21
22
-
This index validates the consistency between _index.adoc_ and individual error files, identifying discrepancies in Error codes, status descriptions, and page roles.
22
+
This index validates the consistency between _index.adoc_ and individual error files, identifying discrepancies in error codes, status descriptions, and page roles.
23
23
24
24
What it does::
25
25
* Checks for error codes mentioned in the index.adoc file that don't have corresponding files.
26
26
* Finds error files without index entries.
27
27
* Detects status description mismatches between the index and individual files.
28
28
* Verifies page role consistency.
29
29
30
-
=== `update-gql-error-index.sh`
30
+
=== `validate-error-auto-index.py`
31
+
32
+
This index validates the consistency between _auto-index.adoc_ and individual error files, identifying discrepancies in error codes, status descriptions, and page roles.
31
33
32
-
This script runs the previous two scripts (the generation and validation scripts), and if validation passes, it replaces _index.adoc_ with _auto-index.adoc_.
34
+
What it does::
35
+
* Checks for error codes mentioned in the index.adoc file that don't have corresponding files.
36
+
* Finds error files without index entries.
37
+
* Detects status description mismatches between the index and individual files.
38
+
* Verifies page role consistency.
39
+
40
+
=== `update-gql-error-index.sh`
41
+
This script orchestrates the execution of the other scripts in a specific order to ensure that the error index is generated and validated correctly.
33
42
34
43
What it does::
35
-
* Runs the `generate-gql-error-index-from-template.py` script to generate the _auto-index.adoc_ file.
36
-
* Runs the `validate_error_index.py` script to validate the generated file against the individual error files.
37
-
* If validation passes, it replaces the existing _index.adoc_ file with _auto-index.adoc_.
38
-
* If validation fails, it prints an error message and does not replace the _index.adoc_ file, while also keeping the _auto-index.adoc_ file for review.
44
+
1. Runs the validation script to check for discrepancies between the _index.adoc_ file and the individual error files.
45
+
2. If validation passes, it runs the generation script to create the _auto-index.adoc_ file.
46
+
3. Runs the validation script again to check for discrepancies between the _auto-index.adoc_ file and the individual error files.
47
+
4. If validation passes, it replaces the existing _index.adoc_ file with _auto-index.adoc_.
48
+
5. If validation fails, it prints an error message and does not replace the _index.adoc_ file, while also keeping the _auto-index.adoc_ file for manual review.
0 commit comments