Rule-set to disallow contractions?

I’m wondering, is there a way to get languagetool to flag all contractions as errors? I’m doing formal writing, and I use contractions without noticing quite a bit.

I’m currently running languagetool as a self-hosted server. Is this possible?

I don’t think we have a rule for that (but I might be wrong). You could write your own rules, as documented at Development Overview | dev.languagetool.org.