Skip to content

Commit 639da94

Browse files
committed
Break code formatting command into multiple lines
A script included in the repository formats the code in the examples according to Arduino's standard style. Since the formatter tool does not have a recursive capability, `find` must be used. This results in a fairly long and complex command. Adding line breaks to split the command into its individual arguments, with indentation to indicate the structure of these arguments makes the command easier to understand.
1 parent d62f11c commit 639da94

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

examples_formatter.sh

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,10 @@
11
# you need to have astyle installed before running this
2-
find examples -regextype posix-extended -regex '.*\.((ino)|(h)|(cpp)|(c))$' -and -type f -exec astyle --options=examples_formatter.conf {} \;
2+
find \
3+
examples \
4+
-regextype posix-extended \
5+
-regex '.*\.((ino)|(h)|(cpp)|(c))$' -and \
6+
-type f \
7+
-exec \
8+
astyle \
9+
--options=examples_formatter.conf \
10+
{} \;

0 commit comments

Comments
 (0)