File tree Expand file tree Collapse file tree 2 files changed +18
-6
lines changed Expand file tree Collapse file tree 2 files changed +18
-6
lines changed Original file line number Diff line number Diff line change @@ -38,6 +38,8 @@ TEMPLATEPATH=../.Makefile.template
38
38
# ## default target ###
39
39
DEFAULT += help
40
40
41
+ UNCRUSTIFY_CFG = ./.uncrustify.cfg
42
+
41
43
# ## menuconfig targets ###
42
44
43
45
.PHONY : menuconfig
@@ -121,15 +123,15 @@ TARGET += uncrustify
121
123
HELP_uncrustify = formats code with uncrustify
122
124
uncrustify : | check-docker
123
125
@make --no-print-directory -C $(DOCKERDIR ) uncrustify \
124
- EXEC=" git ls-files -ico $( forach PATTERN,$( FORMAT) ,-x $( PATTERN) )
126
+ EXEC=" git ls-files -ico $( foreach PATTERN,$( FORMAT) ,-x $( PATTERN) ) \
125
127
| xargs -I % uncrustify -c $(UNCRUSTIFY_CFG ) -f % -o %"
126
128
127
129
.PHONY : check-uncrustify
128
130
TARGET += check-uncrustify
129
131
HELP_check-uncrustify = check if formatting code with uncrustify is necessary
130
132
check-uncrustify : | check-docker
131
133
@make --no-print-directory -C $(DOCKERDIR ) uncrustify \
132
- EXEC=" git ls-files -ico $( forach PATTERN,$( FORMAT) ,-x $( PATTERN) ) \
134
+ EXEC=" git ls-files -ico $( foreach PATTERN,$( FORMAT) ,-x $( PATTERN) ) \
133
135
| xargs -I % sh -c ' uncrustify -c $(UNCRUSTIFY_CFG) -f % \
134
136
| git -c color.diff.new=' normal 22' \
135
137
-c color.diff.old=' normal 88' \
Original file line number Diff line number Diff line change 1
1
FROM ubuntu:18.04
2
2
RUN apt-get update && apt-get -y install \
3
3
git \
4
- uncrustify \
4
+ cmake \
5
+ g++ \
6
+ python3 \
7
+ sudo \
5
8
;
6
9
7
10
ARG UID=1000
8
11
ARG GID=1000
9
- RUN groupadd -g $GID -o developer
10
- RUN useradd -m -u $UID -g $GID -s /bin/bash developer
11
- RUN echo "developer ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
12
+ RUN groupadd -g $GID -o developer \
13
+ && useradd -m -u $UID -g $GID -s /bin/bash developer \
14
+ && echo "developer ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
12
15
13
16
WORKDIR /home/developer
14
17
USER developer
15
18
ENV LC_ALL=C.UTF-8 LANG=C.UTF-8
16
19
20
+ RUN export REPO=/tmp/uncrustify \
21
+ && git clone https://github.com/uncrustify/uncrustify.git $REPO \
22
+ && mkdir $REPO/build \
23
+ && cd $REPO/build \
24
+ && cmake .. \
25
+ && sudo make install \
26
+ && sudo rm -rf $REPO
You can’t perform that action at this time.
0 commit comments