Skip to content

[Feature]: Add Remove-LineComment filter to strip comments from code lines - #14

Merged
Marius Storhaug (MariusStorhaug) merged 7 commits into
mainfrom
removeLineComment
Feb 1, 2025
Merged

[Feature]: Add Remove-LineComment filter to strip comments from code lines#14
Marius Storhaug (MariusStorhaug) merged 7 commits into
mainfrom
removeLineComment

Conversation

@MariusStorhaug

@MariusStorhaug Marius Storhaug (MariusStorhaug) commented Feb 1, 2025

Copy link
Copy Markdown
Member

Description

This pull request introduces a new PowerShell filter Remove-LineComment.

  • Addition of the Remove-LineComment filter, which uses the PowerShell Abstract Syntax Tree (AST) to parse the input line and identify comment tokens. If a comment is found, it is removed, and the modified line is returned. If no comment is present, the original line is returned unchanged.

Type of change

  • 📖 [Docs]
  • 🪲 [Fix]
  • 🩹 [Patch]
  • ⚠️ [Security fix]
  • 🚀 [Feature]
  • 🌟 [Breaking change]

Checklist

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas

@github-actions

github-actions Bot commented Feb 1, 2025

Copy link
Copy Markdown

Module AST - v0.2.3 published to the PowerShell Gallery.

@github-actions

github-actions Bot commented Feb 1, 2025

Copy link
Copy Markdown

GitHub release for AST v0.2.3 has been created.

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.

1 participant