make: Add phony targets for scala formatting

This commit is contained in:
David Biancolin 2022-05-24 21:58:31 +00:00
parent 4fecf9a234
commit 89be5929eb
1 changed files with 21 additions and 0 deletions

View File

@ -283,6 +283,27 @@ scaladoc:
cd $(base_dir) && $(SBT) "project {file:$(firesim_base_dir)}firesim" "unidoc"
.PHONY: scaladoc
#########################
# Scalafmt #
#########################
# Checks that all scala main sources under firesim SBT subprojects are formatted.
scalafmtCheckAll:
cd $(base_dir) && $(SBT) ";project {file:$(firesim_base_dir)}firesim; \
firesim / scalafmtCheckAll; \
firesimLib / scalafmtCheckAll; \
midas / scalafmtCheckAll ; \
targetutils / scalafmtCheckAll ;"
# Runs the code reformatter in all firesim SBT subprojects
scalafmtAll:
cd $(base_dir) && $(SBT) ";project {file:$(firesim_base_dir)}firesim; \
firesim / scalafmtAll; \
firesimLib / scalafmtAll; \
midas / scalafmtAll ; \
targetutils / scalafmtAll ;"
.PHONY: scalafmtCheckAll scalafmtAll
#########################
# Cleaning Recipes #
#########################