Skip to content

HighMark-31/CodeCleaner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

6 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🧹 Code Cleaner

The Ultimate VSCode Extension for Code Quality Management

Version License Publisher TypeScript VSCode

Remove & Manage Comments and Emojis from Code – Automatically clean your source code with advanced algorithms that find and remove unwanted inline comments, multiline comments, and emojis in 15+ programming languages.

πŸ”— Website: codecleaner.highmark.it
πŸ›οΈ Marketplace: Install from VSCode Marketplace


✨ Key Features

Feature Description
πŸš€ Ultra-Fast Finds and removes comments & emojis in seconds
🎯 Precision Advanced algorithms that prevent false positives
🌐 Multi-Language Supports 15+ programming languages out of the box
🎨 Smart Highlighting Visual feedback with color-coded results
⌨️ Quick Navigation Jump between occurrences with keyboard shortcuts
πŸ” Flexible Scanning Search for comments, emojis, or both
πŸ“Š Detailed Reports See exactly what will be removed before action
βš™οΈ Zero Config Works instantly with no setup required

🌐 Supported Languages

Complete List (15+ languages):

  • βœ… JavaScript - // and /* */
  • βœ… TypeScript - // and /* */
  • βœ… Python - #, """, and '''
  • βœ… Java - // and /* */
  • βœ… C / C++ / C# - // and /* */
  • βœ… PHP - //, #, and /* */
  • βœ… HTML / XML - <!-- -->
  • βœ… CSS / SCSS - /* */
  • βœ… Rust - // and /* */
  • βœ… Go - // and /* */
  • βœ… Kotlin - // and /* */
  • βœ… Swift - // and /* */
  • βœ… Ruby - # and =begin...=end
  • βœ… SQL - -- and /* */
  • βœ… And More - Generic patterns for unlisted languages

Note: For languages not explicitly listed, Code Cleaner uses intelligent generic patterns that work with most common comment syntaxes.


πŸš€ Core Features

πŸ”Ž Search & Find

  • Find Inline Comments - Locate all single-line comments
  • Find Multiline Comments - Locate all comment blocks
  • Find Emojis - Locate all emoji characters in code
  • Find All - Combine all searches in one operation

πŸ—‘οΈ Removal & Cleanup

  • Remove Inline Comments - Delete single-line comments
  • Remove Multiline Comments - Delete comment blocks
  • Remove Emojis - Delete all emoji characters
  • Remove All - Perform complete cleanup in one step

🧭 Navigation & Management

  • Navigate to Next Match - Jump to next occurrence
  • Navigate to Previous Match - Jump to previous occurrence
  • Clear Highlights - Remove all visual highlights
  • Undo Changes - Standard Ctrl+Z undo support

πŸ“– Usage Guide

Installation Methods

Method 1: VSCode Marketplace (Recommended)

  1. Open VSCode
  2. Go to Extensions (Ctrl+Shift+X / Cmd+Shift+X)
  3. Search for "Code Cleaner"
  4. Click Install
  5. Done! βœ…

Method 2: Install from VSIX

  1. Open VSCode
  2. Go to Extensions panel (Ctrl+Shift+X)
  3. Click the three dots β‹―
  4. Select "Install from VSIX..."
  5. Choose the extension file
  6. Restart VSCode

Method 3: Command Line

code --install-extension highmark-it.codecleaner

How to Use

Using Context Menu (Right-Click)

  1. Open a code file in VSCode
  2. Right-click in the editor
  3. Select "Code Cleaner" from the context menu
  4. Choose your desired command
  5. View results and confirm action

Using Command Palette

  1. Press Ctrl+Shift+P (Windows/Linux) or Cmd+Shift+P (Mac)
  2. Type "Code Cleaner:" to filter commands
  3. Select the desired command
  4. Execute and view results

Keyboard Shortcuts

Shortcut Action
Enter Go to next match
Shift+Enter Go to previous match
Escape Clear all highlights

πŸ“‹ Available Commands

Command Description Command ID
Find Inline Comments Locate all // style comments codecleaner.findInlineComments
Find Multiline Comments Locate all /* */ blocks codecleaner.findMultilineComments
Find Emojis Locate all emoji characters codecleaner.findEmojis
Remove Inline Comments Delete all // comments codecleaner.removeInlineComments
Remove Multiline Comments Delete all /* */ blocks codecleaner.removeMultilineComments
Remove Emojis Delete all emoji characters codecleaner.removeEmojis
Navigate to Next Match Jump to next occurrence codecleaner.navigateNext
Navigate to Previous Match Jump to previous occurrence codecleaner.navigatePrevious
Clear Highlights Remove all highlighting codecleaner.clearHighlights

πŸ’‘ Usage Examples

Example 1: Cleaning JavaScript with Mixed Comments

Before:

// TODO: Implement this function πŸ˜…
function calculateTotal(items) {
  /**
   * This function calculates the total
   * of items in the cart πŸ›’
   */
  return items.reduce((sum, item) => sum + item.price, 0);
  // Sum the prices πŸ’°
}

After (with Code Cleaner):

function calculateTotal(items) {
  return items.reduce((sum, item) => sum + item.price, 0);
}

Example 2: Python Code with Emojis

Before:

def greet_user(name):  # Greeting function πŸ‘‹
    """Greets the user with a personalized message πŸŽ‰"""
    return f"Hello {name}! 😊"  # Welcome message

After (with Code Cleaner):

def greet_user(name):
    """Greets the user with a personalized message"""
    return f"Hello {name}!"

Example 3: HTML Cleanup

Before:

<div>
  <!-- Header section 🎨 -->
  <header>Welcome</header> <!-- Top navigation -->
</div>

After (with Code Cleaner):

<div>
  <header>Welcome</header>
</div>

βš™οΈ Use Cases

βœ… Code Reviews - Remove comments to focus on actual code βœ… Production Deployment - Clean code before minification βœ… Code Quality - Standardize codebase without noise βœ… Learning - Focus on logic without comment distractions βœ… Minification - Pre-clean before build tools βœ… Code Sharing - Share clean code with teams βœ… Refactoring - Identify dead comments βœ… Legacy Code - Clean up old codebases


πŸ“Š Quick Stats

  • Languages Supported: 15+
  • Comment Syntaxes Handled: 20+
  • Lines of Code: Minimal & optimized
  • Performance: <100ms for typical files
  • File Size: Lightweight (~50KB)
  • Dependencies: Zero external dependencies

πŸ”’ Privacy & Security

βœ… 100% Local Processing - All operations run on your machine
βœ… No Data Collection - We don't track or analyze your code
βœ… No Internet Required - Works completely offline
βœ… Open Source - Code available for review
βœ… MIT Licensed - Free for personal and commercial use


πŸ†˜ Troubleshooting

Extension not appearing in Command Palette?

1. Reload VSCode: Ctrl+Shift+P β†’ "Reload Window"
2. Restart VSCode completely
3. Check that the extension is enabled

Commands not working?

1. Make sure a file is open in the editor
2. Try using Ctrl+Shift+P for Command Palette
3. Check Extensions panel to verify installation

Incorrect removals?

1. First use "Find" commands to preview results
2. Check for edge cases in your comment syntax
3. Report issues on GitHub with code examples

🀝 Contributing

We welcome contributions! To help improve Code Cleaner:

  1. Fork the repository
  2. Create a branch for your feature
  3. Make your changes and test thoroughly
  4. Submit a Pull Request with detailed description

Development Setup

# Clone the repository
git clone https://github.com/HighMark-31/CodeCleaner.git

# Install dependencies
npm install

# Build the extension
npm run build

# Run tests
npm test

πŸ“ Changelog

See CHANGELOG.md for detailed version history and updates.

Latest Release: v1.0.2

  • Bug fixes and performance improvements
  • Enhanced emoji detection
  • Better multiline comment handling

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

You are free to:

  • βœ… Use commercially
  • βœ… Modify the code
  • βœ… Distribute it
  • βœ… Use privately

Conditions:

  • ⚠️ Include license notice
  • ⚠️ State significant changes

🌟 Support & Feedback

Ways to Support

  1. ⭐ Star this repository - Helps others discover it
  2. πŸ“ Leave a review on the VSCode Marketplace
  3. πŸ› Report bugs with detailed examples
  4. πŸ’‘ Suggest features on our GitHub Issues
  5. πŸ”„ Share with developers in your network

Get Help


πŸ‘¨β€πŸ’» Author

Developed by HighMark IT | Marco N.


🎯 Roadmap

Planned Features

  • Batch processing for multiple files
  • Custom comment pattern rules
  • Before/after preview mode
  • Comment statistics and reports
  • Integration with build tools
  • Custom language support
  • Theme customization
  • Performance analytics

Thank you for using Code Cleaner! ❀️

If you find this extension helpful, please consider leaving a ⭐ on GitHub and a review on the VSCode Marketplace. Your support drives development!


Version: 1.0.2
Last Updated: December 2024
License: MIT
Status: Active Development βœ…

About

VSCode Extension that cleans your code

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published