New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

crlf-phobia

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

crlf-phobia

Scared of CRLF

  • 1.2.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
73
increased by97.3%
Maintainers
1
Weekly downloads
 
Created
Source

CRLF-Phobia

CRLF can cause disaster on your app sometimes.

Run this simple inefficient app to scan your project files and it will warn you if there is a file with CRLF endings.

This app will ignore files ignored by .gitignore by default if exists, It also ignores binary files. You can add or remove ignore files by using adding .crlfignore to the same level.

Installation:

npm i -g crlf-phobia # Global
npm i -D crlf-phobia # To hook with unit test locally

Usage:

crlf-phobia *.cpp # All CPP
crlf-phobia * .* # All Files exclude gitignored (for zsh, for PowerShell idk)

Note: CRLF-Phobia support both shell glob (Glob done by shell before parsing argv into program) and also shipped with glob in case your shell is lazy.

Q: Isn't there already an npm package that can do this?

A: Yes

Q: So how is yours different?

A: Colors and MEMES

jk, this one is designed with "crlf-phobia" in mind.

「駆逐してやる このプロジェックから、一匹残らず」

I will wipe out every single CRLF from this project.

Limitation

  • Awful performance: This library check for whole file to make sure not a single CRLF can survive!

  • Can only detect CRLF, because who use CR nowadays?

Advanced Usage

Run before test:

"test": "crlf-phobia * .* && pnpm real-test"

Run with GitHub Workflow

name: CRLF Phobia

on:
  push:

jobs:
  main:
    name: NO CRLF
    runs-on: ubuntu-latest

    steps:
      - name: actions/checkout
        uses: actions/checkout@v3

      # Do anything you want

      - name: Run CRLF-Phobia
        run: npx crlf-phobia * .*

FAQs

Package last updated on 18 May 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc