Personally, I prefer to specify command lines flags as an array rather than a string.
- Group Reviewers
- rARC30ecf46c1167: Allow `ArcanistExternalLinter` flags to be specified as an array.
Yeah, this is really good. I generally lean toward being more aggressive with it and deprecating string support, which is unsafe/ambiguous/yuck. This stuff is mostly fairly new, and probably has little use outside of the upstream. But whatever you're comfortable with is fine; less aggressive versions of this patch put us in a better place, too.
Couple of minor inlines.
I think the old version of this may have been slightly more clear.
It would be nice if we could return array() here and then use %Ls and avoid any of this %C stuff. I'm not sure if any linters would have trouble adapting to that or not. I think it would be OK to break the .arclint format, even, and require list<string>.
I think this should be nonempty() now instead of coalesce().
I'd prefer to be more aggressive and deprecate string support as much as possible. I will resubmit this diff the way that I would like it (ideally), and we can add deprecation warnings where necessary.
Whoops. Not sure how this happened.
I agree with this.
Hm... Interestingly, ruby '-w -c' (which is the output from csprintf('%C %Ls', 'ruby', array('-w', '-c')) is not equivalent to ruby -w -c.
On my machine, it causes an error:
> ruby '-w -c' ruby: invalid option - (-h will show valid options) (RuntimeError)
I think that we should have a %LR format specifier for csprintf.