A command line tool to detect inappropriate language in your code.
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.
> solemn -f /app/**/**> solemn -f /app/**/*css -json
-f --files <pattern> <pattern>* A list of glob patterns for the filesyou want searched Example:/app/**/*js /app/**/*css-d --dictionary <path> A file path to a dictionary If thisoption is not used it will use adefault dictionary The customdictionary file is a JSON filecontaining a single JSON object Thekeys of the object are words in thedictionary and the values for each keyis an array of category tags Example:"hell": "religious" "rude" "babe":"sexist"-j --json Output violations to the console asJSON
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.
To test the module, run the follow from the command line: