Zulip Chat Archive
Stream: new members
Topic: codestyle checker?
Shanghe Chen (Jun 23 2024 at 15:26):
Hi is it currently a codestyle checker generally or specifically for mathlib? I fount the guidelines and it's nice if there is a codestyle checker for it
Luigi Massacci (Jun 23 2024 at 15:38):
put #lint
at the end of your file
Shanghe Chen (Jun 23 2024 at 15:44):
Thanks! I dont know this command before :tada:
Michael Rothgang (Jun 23 2024 at 17:50):
There is also a style linter (currently mostly written in Python; I'm gradually rewriting it in Lean). Running ./scripts/lint-style.sh
in a terminal will run the linter on all of mathlib - so you will see if you introduced new errors. The linter implements a few checks from the style guidelines, but not all of them.
Michael Rothgang (Jun 23 2024 at 17:51):
There is talk about an auto-formatter for Lean: I personally believe it will happen eventually, but I won't make precise bets when exactly this will happen.
Shanghe Chen (Jun 24 2024 at 02:52):
Thanks! I will check these too!
Last updated: May 02 2025 at 03:31 UTC