Skip to content

Conversation

@djeada
Copy link
Owner

@djeada djeada commented Jun 29, 2025

No description provided.

@djeada djeada requested a review from Copilot June 29, 2025 13:16
Copy link
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

This PR introduces a new Bash script (strip_cpp_comments.sh) that removes C/C++ comments from files in place.

  • Added a new script with argument parsing to allow optional regex filtering for file selection.
  • Implements character-by-character processing to accurately handle line, block, string, and character comments while preserving file permissions.
Comments suppressed due to low confidence (1)

src/strip_cpp_comments.sh:45

  • [nitpick] Reading the input file one character at a time could become a performance bottleneck for very large files. Consider alternatives such as processing the file in larger chunks, if performance becomes a concern.
    while IFS= read -r -N1 c || [[ -n $c ]]; do

@djeada djeada merged commit 7eb55b2 into master Jun 29, 2025
1 check passed
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