Skip to content

Commit

Permalink
add format-dart to makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
avioli committed May 9, 2020
1 parent c22e522 commit 3c19c00
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,18 @@

OBJC_SOURCES := $(shell find . \( -path './example/ios/Runner*' -o -path './ios/Classes/*' \) -a \( -name '*.h' -o -name '*.m' \))
JAVA_SOURCES := $(shell find . -name '*.java')
DART_SOURCES := $(shell find . -name '*.dart')

help:
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'

format: format-java format-objective-c ## Formats all java and objective-c files
format: format-java format-objective-c format-dart ## Formats all java, objective-c and dart files

format-java: $(JAVA_SOURCES) ## Format Java files (*.java)
google-java-format --replace $^

format-objective-c: $(OBJC_SOURCES) ## Format Objective-C header and implementation files (*.h, *.m)
clang-format -i --style=Google $^

format-dart: $(DART_SOURCES) ## Format Dart files (*.dart)
flutter format $^

0 comments on commit 3c19c00

Please sign in to comment.