Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

solemn-cli

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

solemn-cli

A command-line tool that detects inappropriate language in your code.

  • 1.3.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

solemn-cli

A command line tool to detect inappropriate language in your code.

Overview

The command line tool scans a set of files for inappropriate language and prints violation messages to the console. Each inappropriate word is associated to one or more violation categories. For example, you might associate the word "beefcake" with the violation category "sexist". You can use your own custom dictionary to specify words that cause violations.

Usage


> solemn -f ./app/**/*.*

> solemn -f ./app/**/*.css -json

Options


-f, --files <pattern> [<pattern>]*   A list of glob patterns for the files
                                     you want searched. Example:
                                     ./app/**/*.js ./app/**/*.css
-d, --dictionary <path>              A file path to a dictionary. If this
                                     option is not used, it will use a
                                     default dictionary. The custom
                                     dictionary file is a JSON file
                                     containing a single JSON object. The
                                     keys of the object are words in the
                                     dictionary and the values for each key
                                     is an array of category tags. Example:
                                     {"hell": ["religious", "rude"], "babe":
                                     ["sexist"]}
-j, --json                           Output violations to the console as
                                     JSON.

Dictionary Format

Each custom dictionary is a JSON file with the following format:

{
  "word1": ["category1", "category3"],
  "word2": ["category2"],
  "word3": ["category1"]
  "word4": ["category2", "category3", "category4"]
}

Every word must have at least one violation category. If multiple dictionaries are specified, words and their categories are merged.

Test

To test the module, run the follow from the command line:


npm test

Keywords

FAQs

Package last updated on 27 Jun 2016

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