Skip to content
| Marketplace
Sign in
Visual Studio Code>Linters>Code JanitorNew to Visual Studio Code? Get it now.
Code Janitor

Code Janitor

Debanshu2005

|
4 installs
| (0) | Free
Autocorrect and format code syntax for C, C++, .ino, Java, JavaScript, and Python inside VS Code.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Code Janitor 🧩

License: MIT

Code Janitor is a multi-language syntax autocorrect & formatter for C, Java, Python, and JavaScript. It fixes missing semicolons, unbalanced braces, and common syntax issues, including embedded C MCU-specific corrections (STM32, AVR, ESP32).


Features

  • Cross-language syntax fixing

  • MCU-specific corrections for Embedded C

  • Auto-add missing semicolons and balance braces

  • CLI tool and npm package

  • Uses popular formatters:

    • JavaScript → Prettier
    • Java → google-java-format
    • Python → Black
    • C/C++ → Uncrustify

Installation

npm install -g code-janitor

Or clone & install locally:

git clone https://github.com/Debanshu2005/code-janitor.git
cd code-janitor
npm install

Usage

Run CLI

code-janitor

Format specific languages

npm run format:js     # JavaScript
npm run format:java   # Java
npm run format:py     # Python
npm run format:c      # C/C++

Example

Before:

#include <stdio.h>
int main() {
    printf("Hello world")
    return 0
}

After Code Janitor:

#include <stdio.h>
int main() {
    printf("Hello world");
    return 0;
}

Contributing

  1. Fork → create branch → commit → push → PR
  2. Ensure formatters & syntax fixes are consistent

License

MIT License © Debanshu2005

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft