Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions app/client/.husky/check-staged-files.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,22 @@ if [ "$is_merge_commit" ]; then
echo "Skipping server and client checks for merge commit"
else
if [ "$is_server_change" -ge 1 ]; then
echo "Running Spotless check ..."
echo "- Applying Spotless to server files..."
pushd app/server > /dev/null
if (mvn spotless:check 1> /dev/null && popd > /dev/null) then
popd
if mvn spotless:apply; then
echo "✔ Spotless applied successfully to server files"
git add .
Comment thread
rishabhrathod01 marked this conversation as resolved.
Outdated
popd > /dev/null
else
echo "Spotless check failed, please run mvn spotless:apply"
echo "Spotless apply failed for server files"
popd > /dev/null
exit 1
fi
else
echo "Skipping server side check..."
echo "Skipping server side check..."
fi

if [ "$is_client_change" -ge 1 ]; then
if [ "$is_client_change" -ge 1 ]; then
echo "Running client check ..."
npx lint-staged --cwd app/client
else
Expand Down
2 changes: 0 additions & 2 deletions app/server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,6 @@
<goals>
<goal>apply</goal>
</goals>
<!-- This gets triggered automatically when we run the build script -->
<phase>compile</phase>
</execution>
</executions>
</plugin>
Expand Down