branch: elpa/flymake-collection commit 62cee0f62cab3d65a7d757bc38f40e4a6dbbf48c Author: Mohsin Kaleem <mohk...@kisara.moe> Commit: Mohsin Kaleem <mohk...@kisara.moe>
Remove flymake-rest-hook-langs.el It looks redundant to me and I think it would be simpler to just have a default out-of-the-box configuration for as many languages as possible. --- README.org | 3 -- flymake-rest-hook-langs.el | 77 ---------------------------------------------- flymake-rest-hook.el | 39 +++++++++++++++++++++-- 3 files changed, 37 insertions(+), 82 deletions(-) diff --git a/README.org b/README.org index c671b6f675..f30bcbed24 100644 --- a/README.org +++ b/README.org @@ -117,9 +117,6 @@ as possible. You can also interactively enable or disable a diagnostic-function from ~flymake-rest-config~ using the ~flymake-rest-change-checker~ command. - *Note*: The default value for ~flymake-rest-config~ is empty, however a list of - recommended associations can be set by requiring ~flymake-rest-hook-langs~. - * Contributing Please do!. There are more linters out there than I have the time to explore, if you'd like to add support for a new linter or contribute improvements to an diff --git a/flymake-rest-hook-langs.el b/flymake-rest-hook-langs.el deleted file mode 100644 index 308cd6b7e0..0000000000 --- a/flymake-rest-hook-langs.el +++ /dev/null @@ -1,77 +0,0 @@ -;;; flymake-rest-hook-langs.el --- Default mode associations for `flymake-rest-hook' -*- lexical-binding: t -*- - -;; Copyright (c) 2021 Mohsin Kaleem - -;; Permission is hereby granted, free of charge, to any person obtaining a copy -;; of this software and associated documentation files (the "Software"), to deal -;; in the Software without restriction, including without limitation the rights -;; to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -;; copies of the Software, and to permit persons to whom the Software is -;; furnished to do so, subject to the following conditions: - -;; The above copyright notice and this permission notice shall be included in all -;; copies or substantial portions of the Software. - -;; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -;; IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -;; FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -;; AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -;; LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -;; OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -;; SOFTWARE. - - -;;; Commentary: - -;; This file sets the default associations for `flymake-rest-config' for all -;; supported major-modes. This is an opinionated section with certain checkers -;; enabled or disabled based on personal preference, which is why it's not -;; loaded by default. Use this when you don't want to setup mode->checker -;; associations yourself. - -;;; Code: - -(require 'flymake-rest-hook) - -(setq flymake-rest-config - (append - '((python-mode - flymake-rest-pycodestyle - (flymake-mypy :disabled t) - (flymake-rest-pylint :disabled t)) - (awk-mode flymake-rest-awk-gawk) - (c-mode - flymake-rest-clang - (flymake-rest-gcc :disabled t)) - (c++-mode - flymake-rest-clang - (flymake-rest-gcc :disabled t)) - (js-mode flymake-rest-eslint) - (js2-mode flymake-rest-eslint) - (typescript-mode flymake-rest-eslint) - (json-mode - flymake-rest-jq - (flymake-rest-jsonlint :disabled t)) - (less-mode flymake-rest-less) - (markdown-mode - flymake-rest-markdownlint - flymake-rest-proselint) - (lua-mode - flymake-rest-luacheck - (flymake-rest-lua :disabled t)) - (sql-mode - flymake-rest-sql-lint - (flymake-rest-sqlint :disabled t)) - (ruby-mode flymake-rest-rubocop) - ;; (hledger-mode flymake-rest-hledger) - (sh-mode flymake-rest-shellcheck) - (yaml-mode flymake-rest-yamllint) - (web-mode flymake-rest-html-tidy) - (org-mode flymake-rest-proselint) - (notmuch-message-mode flymake-rest-proselint) - (nxml-mode flymake-rest-xmllint)) - flymake-rest-config)) - -(provide 'flymake-rest-hook-langs) - -;;; flymake-rest-hook-langs.el ends here diff --git a/flymake-rest-hook.el b/flymake-rest-hook.el index 7faa05e7ed..fa6aa243f9 100644 --- a/flymake-rest-hook.el +++ b/flymake-rest-hook.el @@ -28,8 +28,43 @@ (require 'cl-lib) ;;;###autoload -(defcustom flymake-rest-config nil - "Configuration mapping major-modes to flymake-backends." +(defcustom flymake-rest-config + '((python-mode + flymake-rest-pycodestyle + (flymake-mypy :disabled t) + (flymake-rest-pylint :disabled t)) + (awk-mode flymake-rest-awk-gawk) + (c-mode + flymake-rest-clang + (flymake-rest-gcc :disabled t)) + (c++-mode + flymake-rest-clang + (flymake-rest-gcc :disabled t)) + (js-mode flymake-rest-eslint) + (js2-mode flymake-rest-eslint) + (typescript-mode flymake-rest-eslint) + (json-mode + flymake-rest-jq + (flymake-rest-jsonlint :disabled t)) + (less-mode flymake-rest-less) + (markdown-mode + flymake-rest-markdownlint + flymake-rest-proselint) + (lua-mode + flymake-rest-luacheck + (flymake-rest-lua :disabled t)) + (sql-mode + flymake-rest-sql-lint + (flymake-rest-sqlint :disabled t)) + (ruby-mode flymake-rest-rubocop) + ;; (hledger-mode flymake-rest-hledger) + (sh-mode flymake-rest-shellcheck) + (yaml-mode flymake-rest-yamllint) + (web-mode flymake-rest-html-tidy) + (org-mode flymake-rest-proselint) + (notmuch-message-mode flymake-rest-proselint) + (nxml-mode flymake-rest-xmllint)) + "Configuration mapping major-modes to `flymake' backends." :type 'list :group 'flymake-rest)