Skip to content

Commit e30566e

Browse files
committed
Removed support for CSS Colorguard older then 1.0.0
1 parent dcaa279 commit e30566e

File tree

1 file changed

+0
-41
lines changed

1 file changed

+0
-41
lines changed

flycheck-css-colorguard.el

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -71,59 +71,18 @@
7171
;; line 52 col 5 #000000 collides with #020202 (2:59)
7272
;; line 52 col 5 #000000 collides with #010101 (20:20)
7373

74-
;;;; CSS Colorguard output before 1.0.0:
75-
;; Collision: #000000, #020202
76-
;; - rgba(0,0,0,1) (#000000) [line: 2, 3, 7, 12, 13, 16, 17, 52] is too close (0.3146196209793196) to #020202 (#020202) [line: 2]
77-
;; Collision: #000000, #010101
78-
;; - rgba(0,0,0,1) (#000000) [line: 2, 3, 7, 12, 13, 16, 17, 52] is too close (0.15712369811016996) to #010101 (#010101) [line: 20]
79-
;; Collision: #020202, #010101
80-
;; - #020202 (#020202) [line: 2] is too close (0.1574963682909058) to #010101 (#010101) [line: 20]
81-
8274

8375
;;; Code:
8476

8577
(require 'flycheck)
8678

87-
;;;; For output before css-colorguard 1.0.0
88-
;; (defun flycheck-parse-css-colorguard (output checker buffer)
89-
;; "Proces OUTPUT from colorguard into flycheck errors.
90-
;; CHECKER and BUFFER are returned with flycheck error."
91-
;; (let (errors)
92-
;; (dolist (line (delete "" (split-string output "Collision: ")))
93-
;; (let ((good-part (nth 1 (split-string line " - "))))
94-
;; (let ((first-color (car (split-string good-part " \\[Line: ")))
95-
;; (second-color (car (split-string (nth 1 (split-string good-part " to ")) " \\[Line: ")))
96-
;; (line-numbers (car (split-string (nth 1 (split-string good-part " \\[Line: ")) "]")))
97-
;; (second-line (car (split-string (nth 2 (split-string good-part " \\[Line: ")) "]")))
98-
;; (collision (car (split-string (nth 1 (split-string good-part "]")) " to ")))
99-
;; )
100-
;; (dolist (error-line (split-string line-numbers ", "))
101-
;; (push (flycheck-error-new-at
102-
;; (flycheck-string-to-number-safe error-line)
103-
;; nil
104-
;; 'info
105-
;; (format "%s is too close to %s at line %s" first-color second-color second-line)
106-
;; :checker checker
107-
;; :buffer buffer)
108-
;; errors)
109-
;; (push (flycheck-error-new-at
110-
;; (flycheck-string-to-number-safe second-line)
111-
;; nil
112-
;; 'info
113-
;; (format "%s is too close to %s at line %s" second-color first-color error-line)
114-
;; :checker checker
115-
;; :buffer buffer)
116-
;; errors)))))
117-
;; (nreverse errors)))
118-
11979
(flycheck-define-checker css-colorguard
12080
"Detect similar colors in CSS using CSS Colorguard.
12181
12282
See URL
12383
`https://github.com/SlexAxton/css-colorguard'."
12484
:command ("colorguard" "--file" source)
12585
;;(option "--threshold" "3")
126-
;; :error-parser flycheck-parse-css-colorguard ;; For css-colorguard older then 1.0.0
12786
:error-patterns
12887
((warning line-start
12988
" line " line (one-or-more " ") " col " column (one-or-more " ") (message) line-end))

0 commit comments

Comments
 (0)