<commit_before>;;; flycheck-proselint.el --- A flycheck linter for prose

;; Version: 0.8.0
;; Package-Requires: ((flycheck "1"))
;; Keywords: languages, convenience
;; URL: http://proselint.com/

;;; Commentary:

;; The goal of proselint is to aggregate knowledge about best practices
;; in writing and to make that knowledge immediately accessible to all
;; authors in the form of a linter for prose.
;;
;; This package provides a proselint checker for flycheck.
;;
;; To activate automatically, add to your .emacs, e.g.:
;;   (add-hook 'markdown-mode-hook #'flycheck-mode)
;;   (add-hook 'text-mode-hook #'flycheck-mode)

;;; Code:

(flycheck-define-checker proselint
  "A linter for prose."
  :command ("proselint" source-inplace)
  :error-patterns
  ((warning line-start (file-name) ":" line ":" column ": "
            (id (one-or-more (not (any " "))))
            (message (one-or-more not-newline)
                     (zero-or-more "\n" (any " ") (one-or-more not-newline)))
            line-end))
  :modes (text-mode markdown-mode gfm-mode))

(add-to-list 'flycheck-checkers 'proselint)
<commit_msg>Remember to require flycheck.<commit_after>;;; flycheck-proselint.el --- A flycheck linter for prose

;; Version: 0.8.0
;; Package-Requires: ((flycheck "1"))
;; Keywords: languages, convenience
;; URL: http://proselint.com/

;;; Commentary:

;; The goal of proselint is to aggregate knowledge about best practices
;; in writing and to make that knowledge immediately accessible to all
;; authors in the form of a linter for prose.
;;
;; This package provides a proselint checker for flycheck.
;;
;; To activate automatically, add to your .emacs, e.g.:
;;   (add-hook 'markdown-mode-hook #'flycheck-mode)
;;   (add-hook 'text-mode-hook #'flycheck-mode)

;;; Code:

(require 'flycheck)

(flycheck-define-checker proselint
  "A linter for prose."
  :command ("proselint" source-inplace)
  :error-patterns
  ((warning line-start (file-name) ":" line ":" column ": "
            (id (one-or-more (not (any " "))))
            (message (one-or-more not-newline)
                     (zero-or-more "\n" (any " ") (one-or-more not-newline)))
            line-end))
  :modes (text-mode markdown-mode gfm-mode))

(add-to-list 'flycheck-checkers 'proselint)

{'fraction_non_alphanumeric': 0.153300841825432, 'fraction_numerical': 0.003544528134692069, 'mean_word_length': 3.3091603053435112, 'pattern_counts': {'":': 6, '<': 3, '<?xml version=': 0, '>': 3, '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': '807637', 'n_tokens_mistral': 754, 'n_tokens_neox': 740, 'n_words': 219}