Skip to content

Commit 735174d

Browse files
Initial commit: Comment Cleaner Pro VS Code extension 🦇🦇🦇
This commit includes the complete implementation of the Comment Cleaner Pro extension: - Core functionality to remove comments from 20+ programming languages - Python processing engine (ccp.py) with robust language detection - VS Code integration with context menu and command palette support - Batch processing with glob pattern support and backup options - Activity bar integration with Clean Comments and History views - Test files for all supported languages - Documentation (README, CHANGELOG, CONTRIBUTING) - GitHub issue templates and CI configuration This extension allows developers to quickly clean comments from their code files with a simple right-click or command, supporting languages like Python, JavaScript, TypeScript, HTML, CSS, C/C++, Java and many more.
0 parents  commit 735174d

45 files changed

Lines changed: 1531 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help improve Comment Cleaner Pro
4+
title: '[BUG] '
5+
labels: bug
6+
assignees: ''
7+
8+
---
9+
10+
## Bug Description
11+
A clear and concise description of the bug.
12+
13+
## Steps To Reproduce
14+
1. Go to '...'
15+
2. Click on '....'
16+
3. See error
17+
18+
## Expected Behavior
19+
What you expected to happen.
20+
21+
## Actual Behavior
22+
What actually happened.
23+
24+
## Screenshots
25+
If applicable, add screenshots to help explain your problem.
26+
27+
## Environment
28+
- OS: [e.g. Windows 11, macOS Ventura]
29+
- VS Code Version: [e.g. 1.75.0]
30+
- Extension Version: [e.g. 0.1.0]
31+
- Python Version: [e.g. 3.9.6]
32+
33+
## Additional Information
34+
Any other context about the problem.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for Comment Cleaner Pro
4+
title: '[FEATURE] '
5+
labels: enhancement
6+
assignees: ''
7+
8+
---
9+
10+
## Problem Statement
11+
A clear and concise description of what problem you want to solve.
12+
13+
## Proposed Solution
14+
A clear and concise description of what you want to happen.
15+
16+
## Alternative Solutions
17+
A clear and concise description of any alternative solutions you've considered.
18+
19+
## Additional Context
20+
Add any other context or screenshots about the feature request here.

.vscode/launch.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"name": "Extension",
6+
"type": "extensionHost",
7+
"request": "launch",
8+
"runtimeExecutable": "${execPath}",
9+
"args": [
10+
"--extensionDevelopmentPath=${workspaceFolder}"
11+
],
12+
"outFiles": [
13+
"${workspaceFolder}/out/**/*.js"
14+
],
15+
"preLaunchTask": "${defaultBuildTask}"
16+
}
17+
]
18+
}

.vscode/settings.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"cSpell.words": [
3+
"Christlieb",
4+
"Dela"
5+
]
6+
}

.vscode/tasks.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"version": "2.0.0",
3+
"tasks": [
4+
{
5+
"type": "npm",
6+
"script": "compile",
7+
"group": {
8+
"kind": "build",
9+
"isDefault": true
10+
},
11+
"problemMatcher": "$tsc"
12+
},
13+
{
14+
"type": "npm",
15+
"script": "watch",
16+
"isBackground": true,
17+
"group": "build",
18+
"problemMatcher": "$tsc-watch"
19+
}
20+
]
21+
}

.vscodeignore

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# The following files and directories should be ignored when packaging the extension for distribution
2+
.vscode
3+
node_modules
4+
*.pyc
5+
*.pyo
6+
*.pyd
7+
__pycache__
8+
*.log
9+
*.tmp
10+
.DS_Store
11+
.vscode-test
12+
.vscodeignore

CHANGELOG.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Change Log
2+
3+
All notable changes to the "Comment Cleaner Pro" extension will be documented in this file.
4+
5+
## [0.1.0] - 2025-05-28
6+
7+
### Added
8+
- Initial release of Comment Cleaner Pro
9+
- Support for 20+ programming languages including:
10+
- Python, JavaScript, TypeScript, HTML, CSS, C/C++, Java, Ruby, Go, PHP, SQL
11+
- Swift, Rust, Kotlin, Bash/Shell, PowerShell, Lua, Perl, YAML, Haskell, Dart, MATLAB, R, C#
12+
- Command to clean comments from current file
13+
- Command to clean comments from multiple files using glob patterns
14+
- Context menu integration for quick access
15+
- Options for creating backups before removing comments
16+
- Configurable handling of unknown file types
17+
- Recursive directory processing support

CONTRIBUTING.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Contributing to Comment Cleaner Pro
2+
3+
Thank you for considering contributing to Comment Cleaner Pro! This document provides guidelines and instructions for contributing.
4+
5+
## Development Process
6+
7+
1. Fork the repository
8+
2. Create a feature branch (`git checkout -b feature/amazing-feature`)
9+
3. Make your changes
10+
4. Run tests to ensure everything works
11+
5. Commit your changes (`git commit -m 'Add some amazing feature'`)
12+
6. Push to the branch (`git push origin feature/amazing-feature`)
13+
7. Open a Pull Request
14+
15+
## Development Setup
16+
17+
1. Install dependencies:
18+
```bash
19+
npm install

LICENSE

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
MIT License
2+
3+
Copyright (c) 2025 Christlieb Dela
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6+
7+
1. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8+
9+
2. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

README.md

Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
# Comment Cleaner Pro
2+
3+
<p align="center">
4+
<img src="media/icon.png" width="128" height="128" alt="Comment Cleaner Pro Logo">
5+
</p>
6+
7+
<p align="center">
8+
<a href="https://marketplace.visualstudio.com/items?itemName=ChristliebDela.comment-cleaner-pro">
9+
<img src="https://img.shields.io/visual-studio-marketplace/v/ChristliebDela.comment-cleaner-pro" alt="Version">
10+
</a>
11+
<a href="https://marketplace.visualstudio.com/items?itemName=ChristliebDela.comment-cleaner-pro">
12+
<img src="https://img.shields.io/visual-studio-marketplace/d/ChristliebDela.comment-cleaner-pro" alt="Downloads">
13+
</a>
14+
<a href="https://github.com/christliebdela/Comment-Cleaner-Pro/blob/main/LICENSE">
15+
<img src="https://img.shields.io/github/license/christliebdela/Comment-Cleaner-Pro" alt="License">
16+
</a>
17+
</p>
18+
19+
<p align="center">
20+
<a href="https://github.com/christliebdela/Comment-Cleaner-Pro/actions/workflows/ci.yml">
21+
<img src="https://github.com/christliebdela/Comment-Cleaner-Pro/actions/workflows/ci.yml/badge.svg" alt="CI">
22+
</a>
23+
<a href="https://github.com/christliebdela/Comment-Cleaner-Pro/issues">
24+
<img src="https://img.shields.io/github/issues/christliebdela/Comment-Cleaner-Pro" alt="Issues">
25+
</a>
26+
<a href="https://github.com/christliebdela/Comment-Cleaner-Pro/pulls">
27+
<img src="https://img.shields.io/github/issues-pr/christliebdela/Comment-Cleaner-Pro" alt="Pull Requests">
28+
</a>
29+
</p>
30+
31+
Clean, streamlined code at your fingertips. Remove comments from your source files across 20+ programming languages with just a click..
32+
33+
## Features
34+
35+
- **Multi-language Support** - Works with 20+ popular programming languages including Python, JavaScript, TypeScript, HTML, CSS, C/C++, Java, Ruby, Go, and more.
36+
- **Context Menu Integration** - Right-click in your editor to clean comments from the current file.
37+
- **Batch Processing** - Clean multiple files at once using glob patterns.
38+
- **Backup Options** - Create automatic backups before removing comments.
39+
- **Customizable Processing** - Options to handle unknown file types and recursive directory processing.
40+
41+
![Comment Cleaner Demo](media/demo.gif)
42+
43+
## Supported Languages
44+
45+
- Python
46+
- JavaScript/TypeScript
47+
- HTML/CSS
48+
- C/C++
49+
- Java
50+
- Ruby
51+
- Go
52+
- PHP
53+
- SQL
54+
- Swift
55+
- Rust
56+
- Kotlin
57+
- Bash/Shell
58+
- PowerShell
59+
- Lua
60+
- Perl
61+
- YAML
62+
- Haskell
63+
- Dart
64+
- MATLAB
65+
- R
66+
- C#
67+
- And more...
68+
69+
## Usage
70+
71+
### Clean Current File
72+
73+
1. Open a source code file
74+
2. Right-click in the editor and select "Comment Cleaner Pro: Clean Current File"
75+
3. Alternatively, open the command palette (Ctrl+Shift+P) and search for "Comment Cleaner Pro: Clean Current File"
76+
77+
### Clean Multiple Files
78+
79+
1. Open the command palette (Ctrl+Shift+P)
80+
2. Search for "Comment Cleaner Pro: Clean Multiple Files"
81+
3. Enter a file pattern (e.g., `*.js`, `src/**/*.py`)
82+
4. Follow the prompts to configure backup and processing options
83+
84+
## Requirements
85+
86+
- Python 3.6 or higher
87+
88+
## Extension Settings
89+
90+
This extension doesn't require any configuration settings.
91+
92+
## Known Issues
93+
94+
Please report any issues on our [GitHub repository](https://github.com/christliebdela/Comment-Cleaner-Pro/issues).
95+
96+
## Release Notes
97+
98+
### 0.1.0
99+
100+
- Initial release of Comment Cleaner Pro
101+
- Support for 20+ programming languages
102+
- Single file and batch processing features
103+
- Backup creation option
104+
105+
## License
106+
107+
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
108+
109+
## Author
110+
111+
[Christlieb Dela](https://github.com/christliebdela)

0 commit comments

Comments
 (0)