From 3f4a0d5370ae6c34afe180df96add3b8522f4af1 Mon Sep 17 00:00:00 2001 From: mattkae Date: Wed, 11 May 2022 09:23:58 -0400 Subject: initial commit --- .../flycheck-irony-autoloads.el | 28 +++++ .../flycheck-irony-pkg.el | 2 + .../flycheck-irony-20180604.2152/flycheck-irony.el | 121 +++++++++++++++++++++ .../flycheck-irony.elc | Bin 0 -> 3165 bytes 4 files changed, 151 insertions(+) create mode 100644 elpa/flycheck-irony-20180604.2152/flycheck-irony-autoloads.el create mode 100644 elpa/flycheck-irony-20180604.2152/flycheck-irony-pkg.el create mode 100644 elpa/flycheck-irony-20180604.2152/flycheck-irony.el create mode 100644 elpa/flycheck-irony-20180604.2152/flycheck-irony.elc (limited to 'elpa/flycheck-irony-20180604.2152') diff --git a/elpa/flycheck-irony-20180604.2152/flycheck-irony-autoloads.el b/elpa/flycheck-irony-20180604.2152/flycheck-irony-autoloads.el new file mode 100644 index 0000000..05909d3 --- /dev/null +++ b/elpa/flycheck-irony-20180604.2152/flycheck-irony-autoloads.el @@ -0,0 +1,28 @@ +;;; flycheck-irony-autoloads.el --- automatically extracted autoloads +;; +;;; Code: + +(add-to-list 'load-path (directory-file-name + (or (file-name-directory #$) (car load-path)))) + + +;;;### (autoloads nil "flycheck-irony" "flycheck-irony.el" (0 0 0 +;;;;;; 0)) +;;; Generated autoloads from flycheck-irony.el + +(autoload 'flycheck-irony-setup "flycheck-irony" "\ +Setup Flycheck Irony. + +Add `irony' to `flycheck-checkers'." t nil) + +(if (fboundp 'register-definition-prefixes) (register-definition-prefixes "flycheck-irony" '("flycheck-irony-"))) + +;;;*** + +;; Local Variables: +;; version-control: never +;; no-byte-compile: t +;; no-update-autoloads: t +;; coding: utf-8 +;; End: +;;; flycheck-irony-autoloads.el ends here diff --git a/elpa/flycheck-irony-20180604.2152/flycheck-irony-pkg.el b/elpa/flycheck-irony-20180604.2152/flycheck-irony-pkg.el new file mode 100644 index 0000000..98dbf82 --- /dev/null +++ b/elpa/flycheck-irony-20180604.2152/flycheck-irony-pkg.el @@ -0,0 +1,2 @@ +;;; Generated package description from flycheck-irony.el -*- no-byte-compile: t -*- +(define-package "flycheck-irony" "20180604.2152" "Flycheck: C/C++ support via Irony" '((emacs "24.1") (flycheck "0.22") (irony "0.2.0")) :commit "42dbecd4a865cabeb301193bb4d660e26ae3befe" :authors '(("Guillaume Papin" . "guillaume.papin@epitech.eu")) :maintainer '("Guillaume Papin" . "guillaume.papin@epitech.eu") :keywords '("convenience" "tools" "c") :url "https://github.com/Sarcasm/flycheck-irony/") diff --git a/elpa/flycheck-irony-20180604.2152/flycheck-irony.el b/elpa/flycheck-irony-20180604.2152/flycheck-irony.el new file mode 100644 index 0000000..bc82e2c --- /dev/null +++ b/elpa/flycheck-irony-20180604.2152/flycheck-irony.el @@ -0,0 +1,121 @@ +;;; flycheck-irony.el --- Flycheck: C/C++ support via Irony -*- lexical-binding: t; -*- + +;; Copyright (C) 2014-2015 Guillaume Papin + +;; Author: Guillaume Papin +;; Keywords: convenience, tools, c +;; Package-Version: 20180604.2152 +;; Package-Commit: 42dbecd4a865cabeb301193bb4d660e26ae3befe +;; Version: 0.1.0 +;; URL: https://github.com/Sarcasm/flycheck-irony/ +;; Package-Requires: ((emacs "24.1") (flycheck "0.22") (irony "0.2.0")) + +;; This program is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; This program is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see . + +;;; Commentary: + +;; C, C++ and Objective-C support for Flycheck, using Irony Mode. +;; +;; Usage: +;; +;; (eval-after-load 'flycheck +;; '(add-hook 'flycheck-mode-hook #'flycheck-irony-setup)) + +;;; Code: + +(require 'irony-diagnostics) + +(require 'flycheck) + +(eval-when-compile + (require 'pcase)) + +(defgroup flycheck-irony nil + "Irony-Mode's flycheck checker." + :group 'irony) + +(defcustom flycheck-irony-error-filter #'identity + "A function to filter the errors returned by this checker. + +See :error-filter description in `flycheck-define-generic-checker'. +For an example, take a look at `flycheck-dequalify-error-ids'." + :type 'function + :group 'flycheck-irony) + +(defun flycheck-irony--build-error (checker buffer diagnostic) + (let ((severity (irony-diagnostics-severity diagnostic))) + (if (memq severity '(note warning error fatal)) + (flycheck-error-new-at + (irony-diagnostics-line diagnostic) + (irony-diagnostics-column diagnostic) + (pcase severity + (`note 'info) + (`warning 'warning) + ((or `error `fatal) 'error)) + (irony-diagnostics-message diagnostic) + :checker checker + :buffer buffer + :filename (irony-diagnostics-file diagnostic))))) + +(defun flycheck-irony--start (checker callback) + (let ((buffer (current-buffer))) + (irony-diagnostics-async + #'(lambda (status &rest args) ;; closure, lexically bound + (pcase status + (`error (funcall callback 'errored (car args))) + (`cancelled (funcall callback 'finished nil)) + (`success + (let* ((diagnostics (car args)) + (errors (mapcar #'(lambda (diagnostic) + (flycheck-irony--build-error checker buffer diagnostic)) + diagnostics))) + (funcall callback 'finished (delq nil errors))))))))) + +(defun flycheck-irony--verify (_checker) + "Verify the Flycheck Irony syntax checker." + (list + (flycheck-verification-result-new + :label "Irony Mode" + :message (if irony-mode "enabled" "disabled") + :face (if irony-mode 'success '(bold warning))) + + ;; FIXME: the logic of `irony--locate-server-executable' could be extracted + ;; into something very useful for this verification + (let* ((server-path (executable-find (expand-file-name "bin/irony-server" + irony-server-install-prefix)))) + (flycheck-verification-result-new + :label "irony-server" + :message (if server-path (format "Found at %s" server-path) "Not found") + :face (if server-path 'success '(bold error)))))) + +(flycheck-define-generic-checker 'irony + "A syntax checker for C, C++ and Objective-C, using Irony Mode." + :start #'flycheck-irony--start + :verify #'flycheck-irony--verify + :modes irony-supported-major-modes + :error-filter flycheck-irony-error-filter + :predicate #'(lambda () + irony-mode)) + +;;;###autoload +(defun flycheck-irony-setup () + "Setup Flycheck Irony. + +Add `irony' to `flycheck-checkers'." + (interactive) + (add-to-list 'flycheck-checkers 'irony)) + +(provide 'flycheck-irony) + +;;; flycheck-irony.el ends here diff --git a/elpa/flycheck-irony-20180604.2152/flycheck-irony.elc b/elpa/flycheck-irony-20180604.2152/flycheck-irony.elc new file mode 100644 index 0000000..370b629 Binary files /dev/null and b/elpa/flycheck-irony-20180604.2152/flycheck-irony.elc differ -- cgit v1.2.1