<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html lang="en" style="--code-editor-font: var(--default-mono-font, "GitLab Mono"), JetBrains Mono, Menlo, DejaVu Sans Mono, Liberation Mono, Consolas, Ubuntu Mono, Courier New, andale mono, lucida console, monospace;">
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
<title>
GitLab
</title>

<style data-premailer="ignore" type="text/css">
a { color: #1068bf; }
</style>

<style>img {
max-width: 100%; height: auto;
}
body {
font-size: .875rem;
}
body {
-webkit-text-shadow: hsla(0,0%,100%,.01) 0 0 1px;
}
body {
font-family: "GitLab Sans",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Noto Sans",Ubuntu,Cantarell,"Helvetica Neue",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"; font-size: inherit;
}
</style>
</head>
<body style="font-size: inherit; -webkit-text-shadow: hsla(0,0%,100%,.01) 0 0 1px; font-family: "GitLab Sans",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Noto Sans",Ubuntu,Cantarell,"Helvetica Neue",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";">
<div class="content">

<p class="details" style="font-style: italic; color: #626168;">
<a href="https://gitlab.rtems.org/sebhub">Sebastian Huber</a> created a merge request: <a href="https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1509">!1509</a>
</p>
<div class="branch">
Project:Branches: sebhub/rtems:up/format-generated to rtems/rtos/rtems:main
</div>
<div>
Author: Sebastian Huber
</div>

<div class="md gl-mt-5" style="position: relative; z-index: 1; color: #3a383f; word-wrap: break-word; margin-top: 1rem;">
<h2 id="user-content-summary" dir="auto" style="margin-top: 0px; margin-bottom: 10px;" align="initial">Summary<a href="#summary" aria-label="Link to heading 'Summary'" data-heading-content="Summary" class="anchor" style="margin-top: 0px;"></a>
</h2>
<p dir="auto" style="color: #3a383f; margin: 0px 0px 1rem;" align="initial">Issue <a href="https://gitlab.rtems.org/rtems/rtos/rtems/-/work_items/5066" title="URLs in rtemsspec generated files" class="gfm gfm-issue" data-original="#5066" data-link="false" data-link-reference="false" data-issue="28467" data-project="26" data-iid="5066" data-namespace-path="rtems/rtos/rtems" data-project-path="rtems/rtos/rtems" data-issue-type="issue" data-container="body" data-placement="top" data-reference-type="issue" style="margin-top: 0px;">#5066</a>: URLs in rtemsspec generated files</p>
<p dir="auto" style="color: #3a383f; margin: 0px 0px 1rem;" align="initial">Commits:</p>
<ul dir="auto" style="text-align: initial; list-style-type: disc; margin: 0px 0px 1rem; padding: 0;">
<li style="margin-top: 0px; line-height: 1.6em; margin-left: 25px; padding-left: 3px;"><code style="font-size: 90%; color: #18171d; word-wrap: break-word; background-color: #ececef; border-radius: .25rem; margin-top: 0px; font-family: "GitLab Mono", "JetBrains Mono", "Menlo", "DejaVu Sans Mono", "Liberation Mono", "Consolas", "Ubuntu Mono", "Courier New", "andale mono", "lucida console", monospace; font-variant-ligatures: none; white-space: pre-wrap; overflow-wrap: break-word; word-break: keep-all; padding: 0.125rem 0.25rem;">validation: Guard the transition maps</code></li>
<li style="line-height: 1.6em; margin-left: 25px; padding-left: 3px;"><code style="font-size: 90%; color: #18171d; word-wrap: break-word; background-color: #ececef; border-radius: .25rem; margin-top: 0px; font-family: "GitLab Mono", "JetBrains Mono", "Menlo", "DejaVu Sans Mono", "Liberation Mono", "Consolas", "Ubuntu Mono", "Courier New", "andale mono", "lucida console", monospace; font-variant-ligatures: none; white-space: pre-wrap; overflow-wrap: break-word; word-break: keep-all; padding: 0.125rem 0.25rem;">validation: Reformat with clang-format</code></li>
<li style="line-height: 1.6em; margin-left: 25px; padding-left: 3px;"><code style="font-size: 90%; color: #18171d; word-wrap: break-word; background-color: #ececef; border-radius: .25rem; margin-top: 0px; font-family: "GitLab Mono", "JetBrains Mono", "Menlo", "DejaVu Sans Mono", "Liberation Mono", "Consolas", "Ubuntu Mono", "Courier New", "andale mono", "lucida console", monospace; font-variant-ligatures: none; white-space: pre-wrap; overflow-wrap: break-word; word-break: keep-all; padding: 0.125rem 0.25rem;">rtems: Reword the generated file header</code></li>
<li style="line-height: 1.6em; margin-left: 25px; padding-left: 3px;"><code style="font-size: 90%; color: #18171d; word-wrap: break-word; background-color: #ececef; border-radius: .25rem; margin-top: 0px; font-family: "GitLab Mono", "JetBrains Mono", "Menlo", "DejaVu Sans Mono", "Liberation Mono", "Consolas", "Ubuntu Mono", "Courier New", "andale mono", "lucida console", monospace; font-variant-ligatures: none; white-space: pre-wrap; overflow-wrap: break-word; word-break: keep-all; padding: 0.125rem 0.25rem;">rtems: Reword the generated spec comments</code></li>
<li style="line-height: 1.6em; margin-left: 25px; padding-left: 3px;"><code style="font-size: 90%; color: #18171d; word-wrap: break-word; background-color: #ececef; border-radius: .25rem; margin-top: 0px; font-family: "GitLab Mono", "JetBrains Mono", "Menlo", "DejaVu Sans Mono", "Liberation Mono", "Consolas", "Ubuntu Mono", "Courier New", "andale mono", "lucida console", monospace; font-variant-ligatures: none; white-space: pre-wrap; overflow-wrap: break-word; word-break: keep-all; padding: 0.125rem 0.25rem;">validation: Remove the file header</code></li>
</ul>
<p dir="auto" style="color: #3a383f; margin: 0px 0px 1rem;" align="initial">The sources which the specification generates were the only sources
which did not follow the clang-format style of the repository. The
first two commits format the 381 files which carry the file header.</p>
<p dir="auto" style="color: #3a383f; margin: 0px 0px 1rem;" align="initial">clang-format lays out the entries and the map of a transition map with
one value per line. The source of one action requirement would grow by
50000 lines. The first commit therefore encloses both tables of 127
sources in one pair of <code style="font-size: 90%; color: #18171d; word-wrap: break-word; background-color: #ececef; border-radius: .25rem; margin-top: 0px; font-weight: inherit; overflow-wrap: break-word; white-space: break-spaces; font-family: "GitLab Mono", "JetBrains Mono", "Menlo", "DejaVu Sans Mono", "Liberation Mono", "Consolas", "Ubuntu Mono", "Courier New", "andale mono", "lucida console", monospace; font-variant-ligatures: none; word-break: keep-all; padding: 0.125rem 0.25rem;">clang-format off</code> and <code style="font-size: 90%; color: #18171d; word-wrap: break-word; background-color: #ececef; border-radius: .25rem; font-weight: inherit; overflow-wrap: break-word; white-space: break-spaces; font-family: "GitLab Mono", "JetBrains Mono", "Menlo", "DejaVu Sans Mono", "Liberation Mono", "Consolas", "Ubuntu Mono", "Courier New", "andale mono", "lucida console", monospace; font-variant-ligatures: none; word-break: keep-all; padding: 0.125rem 0.25rem;">on</code> comments. It adds
four lines to each file and changes nothing else.</p>
<p dir="auto" style="color: #3a383f; margin: 0px 0px 1rem;" align="initial">The second commit runs clang-format 22.1.8 with the style file of the
repository. Version 21 rejects the style file, because it does not know
<code style="font-size: 90%; color: #18171d; word-wrap: break-word; background-color: #ececef; border-radius: .25rem; margin-top: 0px; font-weight: inherit; overflow-wrap: break-word; white-space: break-spaces; font-family: "GitLab Mono", "JetBrains Mono", "Menlo", "DejaVu Sans Mono", "Liberation Mono", "Consolas", "Ubuntu Mono", "Courier New", "andale mono", "lucida console", monospace; font-variant-ligatures: none; word-break: keep-all; padding: 0.125rem 0.25rem;">IndentPPDirectives: Leave</code>. A comparison of the C tokens before and
after shows no change in 222 files. Only the layout and the line
continuations move. A second run of clang-format changes nothing.</p>
<p dir="auto" style="color: #3a383f; margin: 0px 0px 1rem;" align="initial">The last three commits follow the proposal in
<a href="https://gitlab.rtems.org/rtems/rtos/rtems/-/work_items/5066#note_159726" title="URLs in rtemsspec generated files" class="gfm gfm-work_item" data-original="https://gitlab.rtems.org/rtems/rtos/rtems/-/work_items/5066#note_159726" data-link="false" data-link-reference="true" data-work-item="28467" data-project="26" data-iid="5066" data-namespace-path="rtems/rtos/rtems" data-project-path="rtems/rtos/rtems" data-work-item-type="issue" data-container="body" data-placement="top" data-reference-type="work_item" style="margin-top: 0px;">#5066 (comment 159726)</a>.
The file header of the 66 generated headers states what the <code style="font-size: 90%; color: #18171d; word-wrap: break-word; background-color: #ececef; border-radius: .25rem; font-weight: inherit; overflow-wrap: break-word; white-space: break-spaces; font-family: "GitLab Mono", "JetBrains Mono", "Menlo", "DejaVu Sans Mono", "Liberation Mono", "Consolas", "Ubuntu Mono", "Courier New", "andale mono", "lucida console", monospace; font-variant-ligatures: none; word-break: keep-all; padding: 0.125rem 0.25rem;">spec:/</code>
comments are for. The comment in front of each part reads
<code style="font-size: 90%; color: #18171d; word-wrap: break-word; background-color: #ececef; border-radius: .25rem; font-weight: inherit; overflow-wrap: break-word; white-space: break-spaces; font-family: "GitLab Mono", "JetBrains Mono", "Menlo", "DejaVu Sans Mono", "Liberation Mono", "Consolas", "Ubuntu Mono", "Courier New", "andale mono", "lucida console", monospace; font-variant-ligatures: none; word-break: keep-all; padding: 0.125rem 0.25rem;">/* Find related documentation with spec:/... */</code>. The 315 generated
test sources lose the file header. 226 of the new comments exceed 80
columns. The style file sets <code style="font-size: 90%; color: #18171d; word-wrap: break-word; background-color: #ececef; border-radius: .25rem; font-weight: inherit; overflow-wrap: break-word; white-space: break-spaces; font-family: "GitLab Mono", "JetBrains Mono", "Menlo", "DejaVu Sans Mono", "Liberation Mono", "Consolas", "Ubuntu Mono", "Courier New", "andale mono", "lucida console", monospace; font-variant-ligatures: none; word-break: keep-all; padding: 0.125rem 0.25rem;">ReflowComments: false</code>, so clang-format
accepts them.</p>
<p dir="auto" style="color: #3a383f; margin: 0px 0px 1rem;" align="initial">The <code style="font-size: 90%; color: #18171d; word-wrap: break-word; background-color: #ececef; border-radius: .25rem; margin-top: 0px; font-weight: inherit; overflow-wrap: break-word; white-space: break-spaces; font-family: "GitLab Mono", "JetBrains Mono", "Menlo", "DejaVu Sans Mono", "Liberation Mono", "Consolas", "Ubuntu Mono", "Courier New", "andale mono", "lucida console", monospace; font-variant-ligatures: none; word-break: keep-all; padding: 0.125rem 0.25rem;">specware</code> generator writes the same bytes with a matching
configuration. The file header and the comment are options of it. The
guard of the transition map is part of the next release.</p>
<p dir="auto" style="color: #3a383f; margin: 0px 0px 1rem;" align="initial">The documentation part of the proposal, <code style="font-size: 90%; color: #18171d; word-wrap: break-word; background-color: #ececef; border-radius: .25rem; margin-top: 0px; font-weight: inherit; overflow-wrap: break-word; white-space: break-spaces; font-family: "GitLab Mono", "JetBrains Mono", "Menlo", "DejaVu Sans Mono", "Liberation Mono", "Consolas", "Ubuntu Mono", "Courier New", "andale mono", "lucida console", monospace; font-variant-ligatures: none; word-break: keep-all; padding: 0.125rem 0.25rem;">% Find related header with spec:/...</code> in rtems-docs, is not part of this merge request. The issue
therefore stays open.</p>
<p dir="auto" style="color: #3a383f; margin: 0px 0px 1rem;" align="initial">The branch was built for <code style="font-size: 90%; color: #18171d; word-wrap: break-word; background-color: #ececef; border-radius: .25rem; margin-top: 0px; font-weight: inherit; overflow-wrap: break-word; white-space: break-spaces; font-family: "GitLab Mono", "JetBrains Mono", "Menlo", "DejaVu Sans Mono", "Liberation Mono", "Consolas", "Ubuntu Mono", "Courier New", "andale mono", "lucida console", monospace; font-variant-ligatures: none; word-break: keep-all; padding: 0.125rem 0.25rem;">sparc/gr740</code> with all tests enabled. The
build shows no warning.</p>
<h2 id="user-content-ai-details" dir="auto" style="margin-top: 20px; margin-bottom: 10px;" align="initial">AI Details<a href="#ai-details" aria-label="Link to heading 'AI Details'" data-heading-content="AI Details" class="anchor" style="margin-top: 0px;"></a>
</h2>

<h3 id="user-content-prompt-used" dir="auto" style="margin-top: 1.5rem; margin-bottom: 1rem; font-weight: 600; font-size: 1.125rem; letter-spacing: inherit; line-height: 1.25; color: #18171d;" align="initial">Prompt used<a href="#prompt-used" aria-label="Link to heading 'Prompt used'" data-heading-content="Prompt used" class="anchor" style="margin-top: 0px;"></a>
</h3>
<p dir="auto" style="color: #3a383f; margin: 0px 0px 1rem;" align="initial">None as a single prompt. The work was done in an interactive Claude
Code session on the RTEMS tree. The task was to format the generated
sources with clang-format and to apply the proposal of <a href="https://gitlab.rtems.org/rtems/rtos/rtems/-/work_items/5066" title="URLs in rtemsspec generated files" class="gfm gfm-issue" data-original="#5066" data-link="false" data-link-reference="false" data-issue="28467" data-project="26" data-iid="5066" data-namespace-path="rtems/rtos/rtems" data-project-path="rtems/rtos/rtems" data-issue-type="issue" data-container="body" data-placement="top" data-reference-type="issue" style="margin-top: 0px;">#5066</a>. Each
change was directed and reviewed.</p>
<h3 id="user-content-ai-model-used" dir="auto" style="margin-top: 1.5rem; margin-bottom: 1rem; font-weight: 600; font-size: 1.125rem; letter-spacing: inherit; line-height: 1.25; color: #18171d;" align="initial">AI model used<a href="#ai-model-used" aria-label="Link to heading 'AI model used'" data-heading-content="AI model used" class="anchor" style="margin-top: 0px;"></a>
</h3>
<p dir="auto" style="color: #3a383f; margin: 0px 0px 1rem;" align="initial">Claude Opus 5.5 (claude-opus-5-5), through Claude Code.</p>
<h3 id="user-content-how-ai-was-used-for-the-contribution" dir="auto" style="margin-top: 1.5rem; margin-bottom: 1rem; font-weight: 600; font-size: 1.125rem; letter-spacing: inherit; line-height: 1.25; color: #18171d;" align="initial">How AI was used for the contribution<a href="#how-ai-was-used-for-the-contribution" aria-label="Link to heading 'How AI was used for the contribution'" data-heading-content="How AI was used for the contribution" class="anchor" style="margin-top: 0px;"></a>
</h3>
<ul dir="auto" style="text-align: initial; list-style-type: disc; margin: 0px 0px 1rem; padding: 0;">
<li style="margin-top: 0px; line-height: 1.6em; margin-left: 25px; padding-left: 3px;">(x) Formatting</li>
<li style="line-height: 1.6em; margin-left: 25px; padding-left: 3px;">( ) Test creation.</li>
<li style="line-height: 1.6em; margin-left: 25px; padding-left: 3px;">(x) Code comments.</li>
<li style="line-height: 1.6em; margin-left: 25px; padding-left: 3px;">( ) The entire contribution was generated using AI</li>
<li style="line-height: 1.6em; margin-left: 25px; padding-left: 3px;">( ) AI code completion such as Copilot in VSCode.</li>
</ul>
<p dir="auto" style="color: #3a383f; margin: 0px 0px 1rem;" align="initial">The session wrote the scripts which insert the guards and rewrite the
file headers and the comments. clang-format did the formatting. The
session checked the result and drafted the commit messages.</p>
<h3 id="user-content-access" dir="auto" style="margin-top: 1.5rem; margin-bottom: 1rem; font-weight: 600; font-size: 1.125rem; letter-spacing: inherit; line-height: 1.25; color: #18171d;" align="initial">Access<a href="#access" aria-label="Link to heading 'Access'" data-heading-content="Access" class="anchor" style="margin-top: 0px;"></a>
</h3>
<p dir="auto" style="color: #3a383f; margin: 0px;" align="initial">I have not used a product which claims copyright in its output, and I
have legitimate access to the one I used.</p>
</div>

</div>
<div class="footer" style="margin-top: 10px;">
<p style="font-size: small; color: #626168;">
—
<br>
<a href="https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1509">View it on GitLab</a>.
<br>
You're receiving this email because of your account on <a target="_blank" rel="noopener noreferrer" href="https://gitlab.rtems.org">gitlab.rtems.org</a>. <a href="https://gitlab.rtems.org/-/namespace/49/sent_notifications/5-2e9eb0hv957zlbacju8fmyg8b-1d/unsubscribe" target="_blank" rel="noopener noreferrer">Unsubscribe</a> from this thread · <a href="https://gitlab.rtems.org/-/profile/notifications" target="_blank" rel="noopener noreferrer" class="mng-notif-link">Manage all notifications</a> · <a href="https://gitlab.rtems.org/help" target="_blank" rel="noopener noreferrer" class="help-link">Help</a>
<span style="color: transparent; font-size: 0; display: none; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0;">
Notification message regarding https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1509 at 1790240585
</span>
<script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","action":{"@type":"ViewAction","name":"View Merge request","url":"https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1509"}}</script>


</p>
</div>
</body>
</html>