Skip to content

Commit 4f1a894

Browse files
authored
Merge pull request #28 from favadi/flycheck-setup
fixes flycheck integration
2 parents 051128d + c62cc12 commit 4f1a894

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

changelog.MD

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ The changelog starts from version 0.1.4 as too much was added in each version be
66

77
- Added the interface keyword (https://github.com/ethereum/emacs-solidity/pull/27).
88

9+
- Fixed flycheck integration doesn't search for solc and solium in PATH.
10+
911
## Version 0.1.9
1012

1113
- Integrated [company-solidity](https://github.com/ssmolkin1/company-solidity) into solidity-mode, providing autocompletion out of the box if the user has [company-mode](http://company-mode.github.io) installed.

solidity-flycheck.el

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -161,20 +161,17 @@ we pass the directory to solium via the `--config' option."
161161
;; first try to add solium to the checker's list since if we got solc
162162
;; it must come after it in the list due to it being chained after solc
163163
(when solidity-flycheck-solium-checker-active
164-
(if (file-executable-p solidity-solium-path)
164+
(if (funcall flycheck-executable-find solidity-solium-path)
165165
(progn
166166
(add-to-list 'flycheck-checkers 'solium-checker)
167167
(setq flycheck-solium-checker-executable solidity-solium-path))
168168
(error (format "Solidity Mode Configuration error. Requested solium flycheck integration but can't find solium at: %s" solidity-solium-path))))
169169

170170
(when solidity-flycheck-solc-checker-active
171-
(if (file-executable-p solidity-solc-path)
171+
(if (funcall flycheck-executable-find solidity-solc-path)
172172
(progn
173173
(add-to-list 'flycheck-checkers 'solidity-checker)
174-
(add-hook 'solidity-mode-hook
175-
(lambda ()
176-
(let ((solidity-command (concat solidity-solc-path)))
177-
(setq flycheck-solidity-checker-executable solidity-command)))))
174+
(setq flycheck-solidity-checker-executable solidity-solc-path))
178175
(error (format "Solidity Mode Configuration error. Requested solc flycheck integration but can't find solc at: %s" solidity-solc-path))))
179176

180177
(provide 'solidity-flycheck)

0 commit comments

Comments
 (0)