diff options
author | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2018-04-18 23:15:44 +0200 |
---|---|---|
committer | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2018-04-19 11:52:07 +0200 |
commit | 2a293843ade5fd276ebdb7fcce030b4f6b1e925f (patch) | |
tree | cd1bc51ed71f47da6700e782e48a822cb03eec6d | |
parent | e87ebca2a755620a13a49cc748ba987b17d2d64d (diff) | |
download | org-mode-2a293843ade5fd276ebdb7fcce030b4f6b1e925f.tar.gz |
org-lint: Remove useless checker
* lisp/org-lint.el (org-lint--checkers): Remove useless checker.
(org-lint-empty-headline-with-tags): Remove function.
* testing/lisp/test-org-lint.el (test-org-lint/empty-headline-with-tags):
Remove test.
-rw-r--r-- | lisp/org-lint.el | 16 | ||||
-rw-r--r-- | testing/lisp/test-org-lint.el | 11 |
2 files changed, 1 insertions, 26 deletions
diff --git a/lisp/org-lint.el b/lisp/org-lint.el index 9fcb17a..f7a45a8 100644 --- a/lisp/org-lint.el +++ b/lisp/org-lint.el @@ -100,7 +100,6 @@ ;; - indented diary-sexps ;; - obsolete QUOTE section ;; - obsolete "file+application" link -;; - blank headlines with tags ;;; Code: @@ -286,12 +285,7 @@ (make-org-lint-checker :name 'file-application :description "Report obsolete \"file+application\" link" - :categories '(link obsolete)) - (make-org-lint-checker - :name 'empty-headline-with-tags - :description "Report ambiguous empty headlines with tags" - :categories '(headline) - :trust 'low)) + :categories '(link obsolete))) "List of all available checkers.") (defun org-lint--collect-duplicates @@ -1037,14 +1031,6 @@ Use \"export %s\" instead" reports)))))))))))) reports)) -(defun org-lint-empty-headline-with-tags (ast) - (org-element-map ast '(headline inlinetask) - (lambda (h) - (let ((title (org-element-property :raw-value h))) - (and (string-match-p "\\`:[[:alnum:]_@#%:]+:\\'" title) - (list (org-element-property :begin h) - (format "Headline containing only tags is ambiguous: %S" - title))))))) ;;; Reports UI diff --git a/testing/lisp/test-org-lint.el b/testing/lisp/test-org-lint.el index 7c4af05..a75563e 100644 --- a/testing/lisp/test-org-lint.el +++ b/testing/lisp/test-org-lint.el @@ -487,17 +487,6 @@ SCHEDULED: <2012-03-29 thu.>" #+end_src" (org-lint '(wrong-header-value))))) -(ert-deftest test-org-lint/empty-headline-with-tags () - "Test `org-lint-empty-headline-with-tags' checker." - (should - (org-test-with-temp-text "* :tag:" - (org-lint '(empty-headline-with-tags)))) - (should - (org-test-with-temp-text "* :tag: " - (org-lint '(empty-headline-with-tags)))) - (should-not - (org-test-with-temp-text "* notag: " - (org-lint '(empty-headline-with-tags))))) (provide 'test-org-lint) ;;; test-org-lint.el ends here |