File tree 5 files changed +25278
-22428
lines changed
5 files changed +25278
-22428
lines changed Original file line number Diff line number Diff line change @@ -49,12 +49,12 @@ generate: $(GENERATED_TARGETS)
49
49
ast/internal/fbast : ast/ast.fbs
50
50
$(GO_GENERATE ) ./ast
51
51
libflux/src/libflux/ast/flatbuffers/ast_generated.rs : ast/ast.fbs
52
- flatc --rust -o libflux/src/libflux/ast/flatbuffers ast/ast.fbs
52
+ flatc --rust -o libflux/src/libflux/ast/flatbuffers ast/ast.fbs && rustfmt $@
53
53
54
54
semantic/internal/fbsemantic : semantic/semantic.fbs
55
55
$(GO_GENERATE ) ./semantic
56
56
libflux/src/libflux/semantic/flatbuffers/semantic_generated.rs : semantic/semantic.fbs
57
- flatc --rust -o libflux/src/libflux/semantic/flatbuffers semantic/semantic.fbs
57
+ flatc --rust -o libflux/src/libflux/semantic/flatbuffers semantic/semantic.fbs && rustfmt $@
58
58
59
59
# Force a second expansion to happen so the call to go_deps works correctly.
60
60
.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 "
You can’t perform that action at this time.
0 commit comments