[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/dart-mode e338148 078/192: Get rid of busted flymake and f
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/dart-mode e338148 078/192: Get rid of busted flymake and formatter support. |
Date: |
Sun, 29 Aug 2021 11:01:54 -0400 (EDT) |
branch: elpa/dart-mode
commit e338148bdb5ee190c30bb0fbea100b9806ea7108
Author: Natalie Weizenbaum <nweiz@google.com>
Commit: Natalie Weizenbaum <nweiz@google.com>
Get rid of busted flymake and formatter support.
---
dart-mode.el | 105 -----------------------------------------------------------
1 file changed, 105 deletions(-)
diff --git a/dart-mode.el b/dart-mode.el
index eeb80a0..36623fe 100644
--- a/dart-mode.el
+++ b/dart-mode.el
@@ -480,111 +480,6 @@ Each list item should be a regexp matching a single
identifier."
(funcall (c-lang-const c-make-mode-syntax-table dart))))
-;;; Flymake Support
-
-(defun flymake-dart-init ()
- "Return the dart_analyzer command to invoke for flymake."
- (let* ((temp-file (flymake-init-create-temp-buffer-copy
- 'flymake-create-temp-inplace))
- (local-file (file-relative-name
- temp-file
- (file-name-directory buffer-file-name)))
- ;; Work around Dart issue 7497
- (work-dir (expand-file-name
- "flymake-dart-work"
- (flymake-get-temp-dir))))
- (list "dart_analyzer" (list "--error_format" "machine" local-file
- "--work" work-dir))))
-
-(defun flymake-dart-cleanup ()
- "Clean up after running the Dart analyzer."
- (flymake-simple-cleanup)
- (let ((dir-name (expand-file-name
- "flymake-dart-work"
- (flymake-get-temp-dir))))
- (condition-case nil
- (delete-dir dir-name t)
- (error
- (flymake-log 1 "Failed to delete dir %s, error ignored" dir-name)))))
-
-(eval-after-load 'flymake
- '(progn
- (when (boundp 'flymake-warn-line-regexp)
- (add-hook 'dart-mode-hook
- (lambda ()
- (set (make-variable-buffer-local 'flymake-warn-line-regexp)
- "^WARNING|"))))
-
- (defadvice flymake-post-syntax-check (before
flymake-post-syntax-check-dart activate)
- "Sets the exit code of the dart_analyzer process to 0.
-
-dart_analyzer can report errors for files other than the current
-file. flymake dies horribly if the process emits a non-zero exit
-code without any warnings for the current file. These two
-properties interact poorly."
- (when (eq major-mode 'dart-mode)
- (ad-set-arg 0 0)))
-
- (push '("\\.dart\\'" flymake-dart-init flymake-dart-cleanup)
- flymake-allowed-file-name-masks)
- ;; Accept negative numbers to work around Dart issue 7495
- (push
'("^[^|]+|[^|]+|[^|]+|file:\\([^|]+\\)|\\([0-9]+\\)|\\([0-9]+\\)|[0-9]+|\\(.*\\)$"
- 1 2 3 4)
- flymake-err-line-patterns)))
-
-
-;;; Formatter integration
-
-(defcustom dart-format-path "dartformat"
- "The path to the dartformat executable.
-
-Defaults to looking it up on `exec-path'."
- :group 'dart-mode)
-
-(defun dart-format-region (beg end)
- "Run the Dart formatter on the current region.
-
-This uses `dart-format-path' to find the formatter."
- (interactive "r")
- (save-excursion
- (goto-char beg)
- (if (eolp) (forward-char))
- (back-to-indentation)
- (let ((indent (/ (current-column) 2)))
- ;; Make sure that the region starts at the beginning of a line so that
the
- ;; formatter can re-indent it correctly.
- (beginning-of-line)
- (setq beg (point))
-
- ;; Same with the end.
- (goto-char end)
- (unless (bolp)
- (end-of-line)
- (forward-char))
- (setq end (point))
-
- (call-process-region
- beg end dart-format-path t t nil
- "--statement" "--indent" (number-to-string indent)))))
-
-(defun dart-format-statement (pos)
- "Run the Dart formatter on the current statement.
-
-This uses `dart-format-path' to find the formatter."
- (interactive "d")
- (save-excursion
- (dart-beginning-of-statement)
- (let ((beg (point)))
- (loop do (condition-case nil
- (forward-sexp)
- (error (backward-up-list -1)))
- until (if (looking-at "[[:space:]\\n]*\\(;\\)")
- (goto-char (match-end 1))
- (and (eq (char-before) ?})
- (eolp))))
- (dart-format-region beg (point)))))
-
-
;;; Dart analysis server
(cl-defstruct
- [nongnu] elpa/dart-mode 53155c1 036/192: Fix map literal indentation when cc-mode thinks it's a defun., (continued)
- [nongnu] elpa/dart-mode 53155c1 036/192: Fix map literal indentation when cc-mode thinks it's a defun., ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode 085522f 044/192: Properly indent continued {} lines as well., ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode 1bba413 046/192: Bump version to 0.7., ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode 592192c 054/192: Bump version to 0.9., ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode aba5eed 064/192: 'dart' must be found to find the analysis server snapshot, ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode 1b01681 065/192: Merge pull request #14 from hterkelsen/issue13, ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode 351db28 072/192: Lexically scope the library., ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode 1ccf8a0 073/192: Better handling and of analysis server messages., ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode a4d7a3c 075/192: Declare compatibility with flycheck 0.23., ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode 1b75622 079/192: Only mention marmalade in the README., ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode e338148 078/192: Get rid of busted flymake and formatter support.,
ELPA Syncer <=
- [nongnu] elpa/dart-mode 05fbd30 081/192: Merge pull request #24 from phst/master, ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode bd08208 082/192: Switch completely to cl-lib (#33), ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode 1f65c88 083/192: Add LIMIT argument for looking-back (#34), ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode 1c9da5a 087/192: Explicitly load compile.el so that the compilation-error-regexp-* variables are defined (#41), ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode eea1000 093/192: Highlight hover dartdoc, ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode 907cba5 095/192: Indicate deprecated hovers, ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode 8e09b68 120/192: Exclusively use cl-lib to avoid byte-compilation inconsistencies, ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode 1249417 108/192: Better handle zero-argument functions, ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode 0277dad 107/192: Include parameter documentation, ELPA Syncer, 2021/08/29
- [nongnu] elpa/dart-mode 73d0ebc 135/192: Merge branch 'refactor-tests', ELPA Syncer, 2021/08/29