11.2.1 • Published 11 months ago

stupid-code v11.2.1

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

Stupid Code

stupid-code is a tool that helps developers scan and identify code in their projects that they consider to be poorly written or "stupid."

Installation

You can install stupid-code globally or as a development dependency in your project.

Global Installation

npm install -g stupid-code

Local Installation

npm install --save-dev stupid-code

Usage

You can run stupid-code using the command line interface.

Command Line Options

  • -p, --path <name>: Specify the directory path to scan.
  • -c, --code <code>: Specify the code snippet to search for.
  • -s, --sourceType <type>: Specify the JavaScript source type. Defaults to 'module'.
  • -o, --output <name>: Specify the output file path. Defaults to 'output.html'.
  • -i, --ignore <name>: Specify the ignore pattern. Defaults to 'node_modules/**'.

Example Commands

  1. Scan a directory for "stupid" code:
   stupidcode -p ./src -c "console.log('debug')"

This command scans the ./src directory for occurrences of console.log('debug').

  1. Specify the JavaScript source type:
   stupidcode -p ./src -c "var x = 1;" -s script

This command scans the ./src directory for the code var x = 1; in files considered as JavaScript scripts.

  1. Output results to a custom file:
   stupidcode -p ./src -c "debugger;" -o results.html

This command scans the ./src directory for occurrences of debugger; and writes the output to results.html.

  1. Ignore specific patterns:
   stupidcode -p ./src -c "eval(" -i "test/**"

This command scans the ./src directory for occurrences of eval( while ignoring files in the test directory.

Repository

You can find the source code and contribute to this project at GitHub - opopeieie/stupid-code.

11.2.1

11 months ago

11.1.10

11 months ago

11.1.9

11 months ago

11.1.8

11 months ago

11.1.7

11 months ago

11.1.6

11 months ago

11.1.5

11 months ago

11.1.4

11 months ago

11.1.2

11 months ago

11.1.1

12 months ago

11.1.0

12 months ago