<commit_before>import {sync as parse} from 'conventional-commits-parser';

export getConfiguration from './library/get-configuration';
export getMessages from './library/get-messages';
export getPreset from './library/get-preset';
export format from './library/format';

export default (message, options = {}) => {
	const {
		preset: {
			parserOpts: parserOptions
		},
		configuration: {
			rules,
			wildcards
		}
	} = options;

	const parsed = parse(message, parserOptions);

	// wildcard matches skip the linting
	const bails = Object.entries(wildcards || {})
		.filter(entry => {
			const [, pattern] = entry;
			return Array.isArray(pattern);
		})
		.filter(entry => {<commit_msg>refactor: expose the entire commit message as raw to rules<commit_after>import {sync as parse} from 'conventional-commits-parser';
import {merge} from 'lodash';

export getConfiguration from './library/get-configuration';
export getMessages from './library/get-messages';
export getPreset from './library/get-preset';
export format from './library/format';

export default (message, options = {}) => {
	const {
		preset: {
			parserOpts: parserOptions
		},
		configuration: {
			rules,
			wildcards
		}
	} = options;

	const parsed = merge(
		{raw: message},
		parse(message, parserOptions)
	);

	// wildcard matches skip the linting
	const bails = Object.entries(wildcards || {})
		.filter(entry => {
			const [, pattern] = entry;
			return Array.isArray(pattern);
		})
		.filter(entry => {
{'fraction_non_alphanumeric': 0.13676371022342587, 'fraction_numerical': 0.0, 'mean_word_length': 4.010169491525423, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '131021', 'n_tokens_mistral': 485, 'n_tokens_neox': 445, 'n_words': 122}