Yes, that sounds like a cleaner way to go about it. Do you want me to make any changes to this patch? When you extract the command to a function argument support comes for free so there'll be no need for it.
flymake-clippy.el | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/flymake-clippy.el b/flymake-clippy.el
index e9dfffc..1599896 100644
--- a/flymake-clippy.el+++ b/flymake-clippy.el
@@ -65,6 +65,11 @@
(defvar-local flymake-clippy--proc nil
"Clippy subprocess object, used to ensure obsolete processes aren't reused.")
+(defvar flymake-clippy-clippy-args nil+ "A list of arguments to be passed to the `cargo clippy' command.++For example, a value of `(\"-W\" \"clippy::pedantic\")' will result in the command `cargo clippy -- -W clippy::pedantic'.")+
I think I might clean this up a bit by extracting the command to a
function. That way we can bring in your new defcustom a little easier
without needing the quoted splice operator. Something like this example:
https://github.com/purcell/flymake-ruby/blob/master/flymake-ruby.el#L42-L44.