@@ -32,7 +32,7 @@ Regardless of where you installed solidity mode from, you need to require the pa
32
32
33
33
** Interface with linters
34
34
*** Provide path to solc binary
35
- The ~ solc~ binary is assumed to be part of the PATH. Wherever that is not the case you would have to manually
35
+ The = solc= binary is assumed to be part of the PATH. Wherever that is not the case you would have to manually
36
36
set the location of the binary like below:
37
37
#+BEGIN_SRC emacs-lisp
38
38
(setq solidity-solc-path "/home/lefteris/ew/cpp-ethereum/build/solc/solc")
@@ -41,7 +41,7 @@ set the location of the binary like below:
41
41
Note: This better be set before requiring solidity mode.
42
42
43
43
*** Provide path to solium binary
44
- The ~ solium~ binary is assumed to be part of the user's ~ PATH~ . If this is not the case
44
+ The = solium= binary is assumed to be part of the user's = PATH= . If this is not the case
45
45
then set its location like below:
46
46
#+BEGIN_SRC emacs-lisp
47
47
(setq solidity-solium-path "/home/lefteris/.npm-global/bin/solium")
@@ -53,19 +53,24 @@ Solidity mode can also interface with [[https://github.com/flycheck/flycheck][fl
53
53
download and install the flycheck package. Then configure it to either work on
54
54
all modes or enable it only for solidity mode.
55
55
56
- Flycheck can interface either with solc or with [[http://solium.readthedocs.io/en/latest/][solium]]. Choose the appropriate
57
- linter to use by providing the following in your emacs init :
56
+ Flycheck can interface with solc and/ or with [[http://solium.readthedocs.io/en/latest/][solium]]. You have to specifically set the path
57
+ to both executables and activate the checker integration by setting the following :
58
58
59
+ To activate =solc= checker
59
60
#+BEGIN_SRC emacs-lisp
60
- (setq solidity-flycheck-active-checker "solium")
61
+ (setq solidity-flycheck-solc-checker-active t)
62
+ #+END_SRC
63
+
64
+ To activate =solium= checker
65
+ #+BEGIN_SRC emacs-lisp
66
+ (setq solidity-flycheck-solium-checker-active t)
61
67
#+END_SRC
62
68
63
- If you want to use ~"solc"~ replace ~"solium"~ with it.
64
69
65
70
Keep in mind that you need to provide the path to either solc or solium unless
66
- emacs can already find it in your environment's ~ PATH~ . Even if you can call it
71
+ emacs can already find it in your environment's = PATH= . Even if you can call it
67
72
from the command line it does not mean that EMACS can see it as emacs may be started
68
- by systemd at which point ~ PATH~ is not fully populated.
73
+ by systemd at which point = PATH= is not fully populated.
69
74
70
75
*** Configuring solc checker
71
76
@@ -82,13 +87,19 @@ By default this is false. If you want to include the standard contracts just add
82
87
You can configure flycheck's solium incocation with the following arguments
83
88
84
89
**** solium RC file
85
- By default solium looks at the current directory of the file you are editing in order to find ~ .soliumrc.json~ . Having this
90
+ By default solium looks at the current directory of the file you are editing in order to find = .soliumrc.json= . Having this
86
91
file is required. But you can point to an external configuration file by putting the following anywhere in your emacs init file.
87
92
88
93
#+BEGIN_SRC emacs-lisp
89
94
(setq flycheck-solidity-solium-soliumrcfile "/home/path/to/common/.soliumrc.json")
90
95
#+END_SRC
91
96
97
+ *** Chaining both checkers
98
+ If you enable both checkers then their results are chained. The variable =solidity-flycheck-chaining-error-level= controls
99
+ how they are chained. Its value can be either =t=, =error=, =warning= or =info= and that controls the maximum error level
100
+ of the solc checker after which solium will not run. If =t= is given solium will always run. The default is =warning=, so
101
+ if anything over than a warning is found in solc solium will not run.
102
+
92
103
* Features
93
104
+ Syntax highlighting
94
105
+ Indentation
0 commit comments