I have bunch of scala projects. They shall share a common code style. I am using scalafmt to enforce certain rules, yet I have to create a
.scalafmt.conf
for each project. If the team changes the scalafmt rules, we'd have to change it for each project manually. So the files are prone to evolve on their own.
How can I create a common scalafmt.conf as my own dependency that other project can import? That way, a project could still depend on their own version of the codestyle -- but the upgrade path is much more straight forward and should only contain of upgrade the dependency.
Scalafmt supports default styles like:
style = default
or
style = defaultWithAlign
I am basically looking for a way to define my own style and reference it in my projects:
style = MyCompanyDefault