Various opinionated changes & modernization #16
Merged
adamw merged 10 commits intoMay 13, 2025
Merged
Conversation
Member
|
This looks good, very nicely documented! Let's merge and see if there are any bug reports :) |
Contributor
Author
|
🙏 @adamw Could you create a release tag, please? |
Member
|
Ah sure, sorry, forgot :) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Here are several unsolicited (and opinionated) improvements that I worked on when I wanted to use this for my own project(s). I hope you find them useful, but I'd understand if it's a bit much.
Changes
.pre-commit-hooks.yamlto match >= 3.20 versionscalafmt+ applysbt-fatal-warnings.pre-commit-config+ ran lint/fmt--project-dir, which is useful for monorepos that don't necessarily have a root-levelbuild.sbt--no-clean, since running ansbt cleanon each commit/push gets slowalways_run, since that makes things unnecessarily slow and disables things like file filterssbt-scalafmt-applyfixedI noticed that
sbt-scalafmt-applydidn't work:Why that is (might be user error), I still don't quite know, but I've fixed the fixed
.pre-commit-hooks.yamlto match >= 3.20 version anyways (you get warnings otherwise) + added an alias, which seems to work fine.Fixed bug with
sbt-fatal-warningsIf you enable that on the current version:
This fixes that by doing
It also fixes the:
Issue.
Added
.pre-commit-config+ FormattingI've taken the liberty of adding a short
.pre-commit-config.yaml, so that the code in this repo gets formatted + linted etc. It usesrufffor formatting, which is easy + fast.I've also updated the
.gitignoreto a more standard format and updated thesetup*files.I've also updated the Python version to 3.9. Debian Trixie is about to code freeze with 3.13, so 3.6 seemed a bit too conservative.
New Flags
Basically,
--no-cleanjust skips thesbt cleanbeforehand. I think that'll make this too slow on larger projects.--project pathjust sets the subprocesscwd, so this can be used in a non-scala monorepo.I also re-wrote the argparser a bit to clean up.
Test
To test the
project-dirflag outside a monorepo: