Zulip Chat Archive
Stream: mathlib4
Topic: Camel case for test files
Yaël Dillies (Aug 19 2025 at 12:09):
Should test files in mathlib be camelCased or snake-cased? Right now, we have a bit of both.
David Renshaw (Aug 19 2025 at 12:31):
My impression is that the snake-cased ones are vestiges from Lean 3.
Bryan Gin-ge Chen (Aug 19 2025 at 12:42):
Do we have a linter for file names? If so, maybe we should make it run on MathlibTest.
Ruben Van de Velde (Aug 19 2025 at 12:43):
We talked about one for windows-invalid file names. I think that landed? Probably it could easily be extended
Yaël Dillies (Aug 19 2025 at 12:45):
In fact, the OS-invalid filenames linter is a derivative of the then already existing camel-case filename linter :laughing:
Michael Rothgang (Aug 19 2025 at 16:51):
I prefer UpperCamelCase (like mathlib modules, and be it for consistency).
Michael Rothgang (Aug 19 2025 at 16:51):
My understanding was that there's a weak consensus for this, but nobody cared enough to rename all the files.
Eric Wieser (Aug 19 2025 at 17:17):
What does lean core do for their tests?
Eric Wieser (Aug 19 2025 at 17:18):
https://github.com/leanprover/lean4/tree/master/tests/lean is mostly lowerCamelCase
Mario Carneiro (Aug 21 2025 at 15:29):
David Renshaw said:
My impression is that the snake-cased ones are vestiges from Lean 3.
Nope, at least for a while I was deliberately snake casing all test files, e.g. interval_cases tactic would have a test file called interval_cases.lean. Having a different naming convention also helps notice that it's not a regular file
Last updated: Dec 20 2025 at 21:32 UTC