When do we get a linter for Coq?
there are many levels to linting. If you mean things like naming and spacing, then we have work on the former here and we reported on work-in-progress for the latter here. Members of the Lean community have some other forms of linting here.
the bottom line is that I don't think anyone will make a general rule-based linter anytime soon for Coq, since it would be very hard to make it work across the extremely diverse set of Coq styles/projects. Thanks to work by devs, we can at least access Coq syntax nowadays without implementing higher-order unification.
Thanks Karl! I was being a bit tongue-in-cheek, but I would be a user of a very simple tool that enforces spacing and indentation according to some God-given criteria, as well as some minor name checks, e.g. CamelCase
vs names_with_underscores
(though I've seen some Horrible_Hybrids
).
we will probably try to do a simplified tool for spacing trained on, say, the standard library with some additional heuristics as a showcase.
old school solution here: http://www.eelis.net/coqindent/
I imagine that coq indent could be simplified with serapi and add support for bullets. It would already be useful for students.
http://www.eelis.net/coqindent/
For the special case of correcting incorrect indentation after removing superfluous braces, I have found that in vscoq you can just hold down the middle mouse button and drag to select the wrongly-indented text, and it seems to correctly reindent it. Not sure how general this is, or how it works, but it might be useful.
I think VsCoq indentation just depends on the source syntax, unlike coqindent. OTOH, I wouldn't personally want indentation based on goal count; that's what bullets are for. And possibly, Set Default Selector "!".
Last updated: Oct 01 2023 at 19:01 UTC