File tree 5 files changed +22187
-19625
lines changed
5 files changed +22187
-19625
lines changed Original file line number Diff line number Diff line change @@ -50,12 +50,12 @@ generate: $(GENERATED_TARGETS)
50
50
ast/internal/fbast : ast/ast.fbs
51
51
$(GO_GENERATE ) ./ast
52
52
libflux/src/ast/flatbuffers/ast_generated.rs : ast/ast.fbs
53
- flatc --rust -o libflux/src/ast/flatbuffers ast/ast.fbs
53
+ flatc --rust -o libflux/src/ast/flatbuffers ast/ast.fbs && rustfmt $@
54
54
55
55
semantic/internal/fbsemantic : semantic/semantic.fbs
56
56
$(GO_GENERATE ) ./semantic
57
57
libflux/src/semantic/flatbuffers/semantic_generated.rs : semantic/semantic.fbs
58
- flatc --rust -o libflux/src/semantic/flatbuffers semantic/semantic.fbs
58
+ flatc --rust -o libflux/src/semantic/flatbuffers semantic/semantic.fbs && rustfmt $@
59
59
60
60
# Force a second expansion to happen so the call to go_deps works correctly.
61
61
.SECONDEXPANSION :
Original file line number Diff line number Diff line change @@ -26,4 +26,14 @@ if [ "$HAS_FMT_ERR" -eq "1" ]; then
26
26
echo ' run "make fmt"' && \
27
27
echo ' '
28
28
fi
29
+
30
+ cd libflux
31
+ FMT_OUT=" $( cargo fmt --all -- --check) "
32
+ if [[ -n " $FMT_OUT " ]]; then
33
+ echo ' Commit includes files that are not rustfmt-ed' && \
34
+ echo ' run "make fmt"' && \
35
+ echo ' '
36
+ HAS_FMT_ERR=1
37
+ fi
38
+
29
39
exit " $HAS_FMT_ERR "
Load Diff Large diffs are not rendered by default.
Load Diff Large diffs are not rendered by default.
You can’t perform that action at this time.
0 commit comments