|
1 | | -;;; ob-phpstan.el --- run phpstan with org-babel -*- lexical-binding: t -*- |
| 1 | +;;; ob-phpstan.el --- Babel Functions for PHPStan -*- lexical-binding: t; -*- |
2 | 2 |
|
3 | | -;; Author: Takeo Obara <bararararatty@gmail.com> |
4 | | -;; Maintainer: Takeo Obara |
5 | | -;; Version: v1.0.0 |
6 | | -;; Package-Requires: ((emacs "29.0")) |
7 | | -;; Homepage: https://github.com/takeokunn/ob-phpstan |
8 | | -;; Keywords: phpstan, org, babel |
| 3 | +;; Copyright (C) 2023 Takeo Obara |
9 | 4 |
|
10 | | -;; This file is not part of GNU Emacs |
| 5 | +;; Author: Takeo Obara <bararararatty@gmail.com> |
| 6 | +;; Version: 0.0.1 |
| 7 | +;; Package-Requires: ((emacs "28") (org "9")) |
| 8 | +;; Homepage: https://github.com/emacs-php/ob-phpstan |
| 9 | +;; Keywords: tools, org, literate programming, reproducible research, php |
| 10 | +;; License: GPL-3.0-or-later |
11 | 11 |
|
12 | | -;; This file is free software; you can redistribute it and/or modify |
| 12 | +;; This program is free software; you can redistribute it and/or modify |
13 | 13 | ;; it under the terms of the GNU General Public License as published by |
14 | | -;; the Free Software Foundation; either version 3, or (at your option) |
15 | | -;; any later version. |
| 14 | +;; the Free Software Foundation, either version 3 of the License, or |
| 15 | +;; (at your option) any later version. |
16 | 16 |
|
17 | 17 | ;; This program is distributed in the hope that it will be useful, |
18 | 18 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of |
19 | 19 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
20 | 20 | ;; GNU General Public License for more details. |
21 | 21 |
|
22 | | -;; For a full copy of the GNU General Public License |
23 | | -;; see <http://www.gnu.org/licenses/>. |
24 | | - |
| 22 | +;; You should have received a copy of the GNU General Public License |
| 23 | +;; along with this program. If not, see <https://www.gnu.org/licenses/>. |
25 | 24 |
|
26 | 25 | ;;; Commentary: |
27 | 26 |
|
28 | | -;; run phpstan with org-babel |
| 27 | +;; Static analyze a block of PHP code with org-babel using PHPStan. |
29 | 28 |
|
30 | 29 | ;;; Code: |
31 | 30 | (require 'org) |
32 | 31 | (require 'ob) |
33 | 32 |
|
34 | 33 | (defgroup ob-phpstan nil |
35 | | - "org-mode blocks for phpstan" |
| 34 | + "org-mode blocks for PHPStan." |
36 | 35 | :group 'org) |
37 | 36 |
|
38 | 37 | (defcustom org-babel-phpstan-command "phpstan" |
|
47 | 46 |
|
48 | 47 | ;;;###autoload |
49 | 48 | (defun org-babel-execute:phpstan (body params) |
50 | | - "Org mode fish evaluate function" |
| 49 | + "Static analyze a block of PHP code with org-babel using PHPStan. |
| 50 | +This function is called by `org-babel-execute-src-block'." |
51 | 51 | (let ((tmp-file (org-babel-temp-file "phpstan-" ".php")) |
52 | 52 | (body (concat "<?php\n" body)) |
53 | 53 | (level (or (cdr (assoc :level params)) org-babel-phpstan-level))) |
|
63 | 63 | '(add-to-list 'org-src-lang-modes '("phpstan" . phpstan))) |
64 | 64 |
|
65 | 65 | (provide 'ob-phpstan) |
66 | | - |
67 | 66 | ;;; ob-phpstan.el ends here |
0 commit comments