Skip to content

Commit

Permalink
Merge pull request #4 from PRL-PRG/fix-formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Jakobeha authored Feb 1, 2024
2 parents 2fb2ee9 + f0d525b commit ea5f28e
Show file tree
Hide file tree
Showing 81 changed files with 4,264 additions and 4,126 deletions.
2 changes: 2 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Fix formatters so they apply to specific languages (apply)
5f4ba7cd2c1dbfadabb122b93b3011f0db56ae95
18 changes: 17 additions & 1 deletion .githooks/pre-commit.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,18 @@
#!/bin/sh
mvn spotless:apply

everything_staged=$(git diff --name-only)

if [ -z "$everything_staged" ]; then
# Don't commit because, after we reformat, the formatting will be unstaged, but it's too hard to determine (and maybe
# ambiguous) what are the formatting differences and what was originally unstaged.
mvn spotless:check || {
echo "*** ERROR ***"
echo "Detected a partial commit that doesn't have proper formatting."
echo "Run 'mvn spotless:apply', make sure every change you want to commit is added, and commit again."
exit 1
}
else
# It's not ambiguous, just format and re-add everything tracked
mvn spotless:apply
git add -u
fi
2 changes: 1 addition & 1 deletion .githooks/pre-push.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#!/bin/sh
mvn verify
mvn verify
Binary file modified .idea/settings.zip
Binary file not shown.
6 changes: 6 additions & 0 deletions .mvn/jvm.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED
--add-exports=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED
--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED
--add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED
--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED
--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED
1 change: 0 additions & 1 deletion doc/design-decisions.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,4 +168,3 @@
useful (`val`, `@Synchronized`, `@SneakyThrows`).
- Also concerns with Lombok adding complexity, Lombok becoming unmaintained, Lombok not being supported by IDEs (
although at least IntelliJ supports it), Lombok being confusing.

Loading

0 comments on commit ea5f28e

Please sign in to comment.