Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitef629aa

Browse files
committed
Update
1 parent3634290 commitef629aa

File tree

4 files changed

+58
-1
lines changed

4 files changed

+58
-1
lines changed

‎.gitignore‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.elc

‎README.md‎

Lines changed: 0 additions & 1 deletion
This file was deleted.

‎README.org‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* ob-phpstan

‎ob-phpstan.el‎

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
;;; ob-phpstan.el --- run phpstan with org-babel -*-lexical-binding:t -*-
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
9+
10+
;; This file is not part of GNU Emacs
11+
12+
;; This file is free software; you can redistribute it and/or modify
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.
16+
17+
;; This program is distributed in the hope that it will be useful,
18+
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
19+
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20+
;; GNU General Public License for more details.
21+
22+
;; For a full copy of the GNU General Public License
23+
;; see <http://www.gnu.org/licenses/>.
24+
25+
26+
;;; Commentary:
27+
28+
;; run phpstan with org-babel
29+
30+
;;; Code:
31+
(require'org)
32+
(require'ob)
33+
34+
(defgroupob-phpstannil
35+
"org-mode blocks for fish script"
36+
:group'org)
37+
38+
(defcustomorg-babel-phpstan-command"~/.asdf/installs/php/8.2.3/.composer/vendor/bin/phpstan"
39+
"The command to execute babel body code."
40+
:group'ob-phpstan
41+
:type'string)
42+
43+
(defcustomorg-babel-phpstan-command-optionsnil
44+
"The fish command options to use when execute code."
45+
:group'ob-phpstan
46+
:type'list)
47+
48+
;;;###autoload
49+
(defunorg-babel-execute:phpstan (body_)
50+
"Org mode fish evaluate function"
51+
(let ((cmd (concat org-babel-phpstan-command"" (mapconcat'string org-babel-phpstan-command-options""))))
52+
(org-babel-eval cmd body)))
53+
54+
(provide'ob-phpstan)
55+
56+
;;; ob-phpstan.el ends here

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp