Skip to content

Enhance VHDL emitter output for better entity/package identification#22

Merged
Malcolmnixon merged 2 commits into
mainfrom
vhdl-improvements
Jun 15, 2026
Merged

Enhance VHDL emitter output for better entity/package identification#22
Malcolmnixon merged 2 commits into
mainfrom
vhdl-improvements

Conversation

@Malcolmnixon

Copy link
Copy Markdown
Member

This pull request enhances the VHDL Markdown emitters by improving the clarity and completeness of generated documentation. The main changes add explicit attribution of entities and packages to their source files, provide clearer section formatting (especially for empty sections), and improve architecture listings with file references. These updates affect both the gradual disclosure and single-file documentation emitters, as well as their design documentation.

Documentation output improvements:

  • Entity and package documentation now includes an attribution paragraph specifying the source filename, improving traceability in both gradual disclosure and single-file outputs. [1] [2] [3] [4]
  • The "Generics" section always appears for entities; if there are no generics, a standardized "None." placeholder is shown, making the documentation more consistent and explicit. [1] [2] [3] [4] [5]

Architecture listing enhancements:

  • Architecture entries now include their source filename and are formatted as **name** (filename): summary, providing more context for each architecture implementation. [1] [2]

Internal code and design documentation updates:

  • The emitters now track and pass source filenames alongside entities, architectures, and packages, ensuring correct attribution in all outputs. [1] [2] [3]
  • Design documentation (vhdl-emitter-gradual-disclosure.md and vhdl-emitter-single-file.md) is updated to reflect these output and API changes, including the new placeholder for empty sections and improved architecture formatting. [1] [2] [3] [4]

…ation

- Always emit Generics section on entity pages; show '*None.*' when empty
  so readers can unambiguously confirm no generics exist
- Add '*Entity declared in \{file}\*' attribution line after each entity heading
- Add '*Package declared in \{file}\*' attribution line after each package heading
- Include source filename in architecture entries formatted as
  '**{name}** (\{file}\): {summary}' so readers know which file to include
- Add NoItemsPlaceholder constant to VhdlEmitter for the above
- Update design docs for VhdlEmitterGradualDisclosure and VhdlEmitterSingleFile
- Add 8 new tests covering the new behaviours across both emitters

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings June 15, 2026 17:43

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request updates the VHDL Markdown emitters to improve traceability and consistency in generated documentation by attributing entities/packages/architectures to source filenames and standardizing empty-section output.

Changes:

  • Add source file attribution paragraphs for entity and package documentation in both single-file and gradual-disclosure emitters.
  • Always emit a “Generics” section for entities; when empty, emit a standardized *None.* placeholder.
  • Include source filename in architecture listings (formatted as **name** (filename): summary) and update design docs/tests accordingly.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
test/ApiMark.Vhdl.Tests/VhdlEmitterSingleFileTests.cs Adds assertions for filename attribution and empty-generics behavior in single-file output.
test/ApiMark.Vhdl.Tests/VhdlEmitterGradualDisclosureTests.cs Adds assertions for filename attribution and empty-generics behavior in gradual-disclosure output.
src/ApiMark.Vhdl/VhdlEmitterSingleFile.cs Tracks per-item source filenames and emits attribution + empty-generics placeholder; augments architecture formatting with filenames.
src/ApiMark.Vhdl/VhdlEmitterGradualDisclosure.cs Tracks per-item source filenames and emits attribution + empty-generics placeholder; augments architecture formatting with filenames.
src/ApiMark.Vhdl/VhdlEmitter.cs Introduces NoItemsPlaceholder constant for standardized empty-section output.
docs/design/api-mark-vhdl/vhdl-emitter-single-file.md Updates design documentation to reflect new attribution, placeholder, and architecture formatting.
docs/design/api-mark-vhdl/vhdl-emitter-gradual-disclosure.md Updates design documentation to reflect new attribution, placeholder, and architecture formatting.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread test/ApiMark.Vhdl.Tests/VhdlEmitterSingleFileTests.cs Outdated
Comment thread test/ApiMark.Vhdl.Tests/VhdlEmitterGradualDisclosureTests.cs Outdated
Both ArchitectureParagraphContainsFilename tests were too weak — they matched
any paragraph containing the filename, which the new entity attribution line
also satisfies. Updated both assertions to require both the bold architecture
name and the filename in the same paragraph.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@Malcolmnixon Malcolmnixon merged commit fc01263 into main Jun 15, 2026
15 checks passed
@Malcolmnixon Malcolmnixon deleted the vhdl-improvements branch June 15, 2026 21:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants