File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change 2828 normalize_md ,
2929)
3030
31+ # SPDX header to prepend to guideline files
32+ GUIDELINE_FILE_HEADER = """\
33+ .. SPDX-License-Identifier: MIT OR Apache-2.0
34+ SPDX-FileCopyrightText: The Coding Guidelines Subcommittee Contributors
35+
36+ """
37+
3138
3239def extract_guideline_id (rst_content : str ) -> str :
3340 """
@@ -57,6 +64,9 @@ def generate_comment(rst_content: str, chapter: str) -> str:
5764 chapter_slug = chapter_to_filename (chapter )
5865 guideline_id = extract_guideline_id (rst_content )
5966
67+ # Prepend the SPDX header to the RST content for display
68+ full_rst_content = GUIDELINE_FILE_HEADER + rst_content .strip ()
69+
6070 # Determine target path based on whether we have a guideline ID
6171 if guideline_id :
6272 target_dir = f"src/coding-guidelines/{ chapter_slug } /"
@@ -122,7 +132,7 @@ def generate_comment(rst_content: str, chapter: str) -> str:
122132<summary><strong>📄 Click to expand RST content</strong></summary>
123133
124134```rst
125- { rst_content }
135+ { full_rst_content }
126136```
127137
128138</details>
You can’t perform that action at this time.
0 commit comments