@@ -460,7 +460,7 @@ Highlight the 1st result."
460
460
(defvar flycheck-solidity-checker-executable )
461
461
(defvar flycheck-solium-checker-executable )
462
462
463
- (flycheck-def-option-var flycheck-solidity-addstd-contracts nil solidity-checker
463
+ (flycheck-def-option-var flycheck-solidity-solc- addstd-contracts nil solidity-checker
464
464
" Whether to add standard solidity contracts.
465
465
466
466
When non-nil, enable add also standard solidity contracts via
@@ -469,14 +469,25 @@ When non-nil, enable add also standard solidity contracts via
469
469
:safe #'booleanp
470
470
:package-version '(solidity-mode . " 0.1.3" ))
471
471
472
+ (flycheck-def-option-var flycheck-solidity-solium-soliumrcfile nil solium-check
473
+ " The path to use for soliumrc.json
474
+
475
+ The value of this variable is either a string denoting a path to the soliumrc.json
476
+ or nil, to use the current directory. When non-nil,
477
+ we pass the directory to solium via the `--config' option."
478
+ :type '(choice (const :tag " No custom soliumrc" nil )
479
+ (string :tag " Custom soliumrc file location" ))
480
+ :safe #'stringp
481
+ :package-version '(solidity-mode . " 0.1.4" ))
482
+
472
483
; ; add dummy source-inplace definition to avoid errors
473
484
(defvar source-inplace t )
474
485
; ; add a solidity mode callback to set the executable of solc for flycheck
475
486
; ; define solidity's flycheck syntax checker
476
487
(flycheck-define-checker solidity-checker
477
488
" A Solidity syntax checker using the solc compiler"
478
489
:command (" solc"
479
- (option-flag " --add-std" flycheck-solidity-addstd-contracts)
490
+ (option-flag " --add-std" flycheck-solidity-solc- addstd-contracts)
480
491
source-inplace)
481
492
:error-patterns
482
493
((error line-start (file-name) " :" line " :" column " :" " Error: " (message ))
@@ -488,7 +499,10 @@ When non-nil, enable add also standard solidity contracts via
488
499
; ; define solium flycheck syntax checker
489
500
(flycheck-define-checker solium-checker
490
501
" A Solidity linter using solium"
491
- :command (" solium" " -f" source-inplace)
502
+ :command (" solium"
503
+ (option " --config=" flycheck-solidity-solium-soliumrcfile concat)
504
+ " -f"
505
+ source-inplace)
492
506
:error-patterns
493
507
((error line-start (zero-or-more " " ) line " :" column (zero-or-more " " ) " error" (message ))
494
508
(warning line-start (zero-or-more " " ) line " :" column (zero-or-more " " ) " warning" (message )))
0 commit comments