Skip to content

Add annotations support for files with semicolon comments#263

Open
mguzmanm wants to merge 3 commits into
mainfrom
cw_support_annotations
Open

Add annotations support for files with semicolon comments#263
mguzmanm wants to merge 3 commits into
mainfrom
cw_support_annotations

Conversation

@mguzmanm
Copy link
Copy Markdown
Contributor

@mguzmanm mguzmanm commented May 26, 2026

Fixes

#262

Changes

Screenshots

Checklist

  • 🤖 This change is covered by unit tests (if applicable).
  • 🤹 Manual testing has been performed (if necessary).
  • 🛡️ Security impacts have been considered (if relevant).
  • 📖 Documentation updates are complete (if required).
  • 🧠 Third-party dependencies and TPIP updated (if required).

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 26, 2026

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds support for Configuration Wizard annotations in files that use semicolon (;) line comments (commonly seen in assembly sources), by making the parser/tokenizer/value-edit logic aware of the active line-comment prefix and updating detection logic and tests accordingly.

Changes:

  • Introduced a shared comment-style definition ('//' vs ';') and threaded the selected prefix through parsing/tokenization and edit generation.
  • Updated the parser to auto-detect the comment prefix from the start marker line, and propagate it through the parsed item tree.
  • Extended the annotation checker (and tests) to recognize semicolon-prefixed wizard start markers.

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/views/config-wizard/parser/tokenizer.ts Makes annotation tokenization prefix-aware via a configurable line comment prefix.
src/views/config-wizard/parser/tokenizer.test.ts Adds coverage for semicolon-prefixed tokenization.
src/views/config-wizard/parser/rw-value.ts Makes comment detection/edit generation prefix-aware for value read/write operations.
src/views/config-wizard/parser/parser.ts Detects the comment prefix from wizard markers and parses annotations using that prefix.
src/views/config-wizard/parser/gui-tree.test.ts Adds integration tests for parsing semicolon marker files and semicolon-based block comment edits.
src/views/config-wizard/parser/cw-string.ts Passes the detected comment prefix into RwValue for string values.
src/views/config-wizard/parser/cw-option.ts Passes the detected comment prefix into RwValue for option read/write paths.
src/views/config-wizard/parser/cw-item.ts Stores and propagates the active line comment prefix across the parsed item tree.
src/views/config-wizard/parser/cw-heading.ts Passes the detected comment prefix into RwValue for heading enable read/write logic.
src/views/config-wizard/parser/cw-comment.ts Uses the detected comment prefix when generating edits to (un)comment blocks.
src/views/config-wizard/parser/comment-style.ts New shared definitions for supported line comment prefixes and defaults.
src/utils/config-wizard-annotation-checker.ts Extends wizard marker detection regex to accept ;-prefixed markers.
src/utils/config-wizard-annotation-checker.test.ts Adds tests for semicolon marker detection within/outside the scan limit.

Comment thread src/views/config-wizard/parser/comment-style.ts
@qltysh
Copy link
Copy Markdown

qltysh Bot commented May 26, 2026

Qlty


Coverage Impact

⬆️ Merging this pull request will increase total coverage on main by 0.03%.

Modified Files with Diff Coverage (10)

RatingFile% DiffUncovered Line #s
Coverage rating: B Coverage rating: B
src/views/config-wizard/parser/cw-string.ts100.0%
Coverage rating: A Coverage rating: A
src/views/config-wizard/parser/parser.ts100.0%
Coverage rating: A Coverage rating: A
src/utils/config-wizard-annotation-checker.ts100.0%
Coverage rating: A Coverage rating: A
src/views/config-wizard/parser/cw-item.ts100.0%
Coverage rating: A Coverage rating: A
src/views/config-wizard/parser/cw-heading.ts100.0%
Coverage rating: B Coverage rating: B
src/views/config-wizard/parser/rw-value.ts100.0%
Coverage rating: A Coverage rating: A
src/views/config-wizard/parser/tokenizer.ts100.0%
Coverage rating: A Coverage rating: A
src/views/config-wizard/parser/cw-option.ts100.0%
Coverage rating: A Coverage rating: A
src/views/config-wizard/parser/cw-comment.ts100.0%
New Coverage rating: A
src/views/config-wizard/parser/comment-style.ts100.0%
Total100.0%
🚦 See full report on Qlty Cloud »

🛟 Help
  • Diff Coverage: Coverage for added or modified lines of code (excludes deleted files). Learn more.

  • Total Coverage: Coverage for the whole repository, calculated as the sum of all File Coverage. Learn more.

  • File Coverage: Covered Lines divided by Covered Lines plus Missed Lines. (Excludes non-executable lines including blank lines and comments.)

    • Indirect Changes: Changes to File Coverage for files that were not modified in this PR. Learn more.

@mguzmanm mguzmanm requested a review from edriouk May 26, 2026 12:03
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