Sebastian Huber created a merge request: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1509
Project:Branches: sebhub/rtems:up/format-generated to rtems/rtos/rtems:main Author: Sebastian Huber ## Summary Issue #5066: URLs in rtemsspec generated files Commits: - `validation: Guard the transition maps` - `validation: Reformat with clang-format` - `rtems: Reword the generated file header` - `rtems: Reword the generated spec comments` - `validation: Remove the file header` 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. 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 `clang-format off` and `on` comments. It adds four lines to each file and changes nothing else. 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 `IndentPPDirectives: Leave`. 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. The last three commits follow the proposal in https://gitlab.rtems.org/rtems/rtos/rtems/-/work_items/5066#note_159726. The file header of the 66 generated headers states what the `spec:/` comments are for. The comment in front of each part reads `/* Find related documentation with spec:/... */`. The 315 generated test sources lose the file header. 226 of the new comments exceed 80 columns. The style file sets `ReflowComments: false`, so clang-format accepts them. The `specware` 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. The documentation part of the proposal, `% Find related header with spec:/...` in rtems-docs, is not part of this merge request. The issue therefore stays open. The branch was built for `sparc/gr740` with all tests enabled. The build shows no warning. ## AI Details <!-- Make sure you have read our statement at https://www.rtems.org/generative-ai/ --> ### Prompt used 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 #5066. Each change was directed and reviewed. ### AI model used Claude Opus 5.5 (claude-opus-5-5), through Claude Code. ### How AI was used for the contribution - (x) Formatting - ( ) Test creation. - (x) Code comments. - ( ) The entire contribution was generated using AI - ( ) AI code completion such as Copilot in VSCode. 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. ### Access I have not used a product which claims copyright in its output, and I have legitimate access to the one I used. -- View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1509 You're receiving this email because of your account on gitlab.rtems.org. Unsubscribe from this thread: https://gitlab.rtems.org/-/namespace/49/sent_notifications/5-2e9eb0hv957zlbacju8fmyg8b-1d/unsubscribe | Manage all notifications: https://gitlab.rtems.org/-/profile/notifications | Help: https://gitlab.rtems.org/help
_______________________________________________ bugs mailing list [email protected] http://lists.rtems.org/mailman/listinfo/bugs
