[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnunet] branch master updated: add yapf to make pretty
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnunet] branch master updated: add yapf to make pretty |
Date: |
Mon, 14 Oct 2019 16:55:00 +0200 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to branch master
in repository gnunet.
The following commit(s) were added to refs/heads/master by this push:
new 3d968d361 add yapf to make pretty
3d968d361 is described below
commit 3d968d36122b64b374feb1be0fd131f6691995f0
Author: ng0 <address@hidden>
AuthorDate: Mon Oct 14 14:52:33 2019 +0000
add yapf to make pretty
---
Makefile.am | 4 ++++
configure.ac | 5 +++++
2 files changed, 9 insertions(+)
diff --git a/Makefile.am b/Makefile.am
index e8bd98da1..579939b09 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -39,7 +39,11 @@ doc_DATA = COPYING README
ACLOCAL_AMFLAGS = -I m4
+# TODO: better nesting.
if HAVE_UNCRUSTIFY_BINARY
pretty:
find $(top_srcdir) -type f -name '*.c' -or -name '*.h' -print0 | xargs
-0 uncrustify -c $(top_srcdir)/contrib/uncrustify.cfg --replace --no-backup
2>&1 || true
+if HAVE_YAPF_BINARY
+ find $(top_srcdir) -type f -name '*.py' -or -name '*.py.in' -print0 |
xargs -0 $(YAPF_BINARY) -i 2>&1 || true
+endif
endif
diff --git a/configure.ac b/configure.ac
index 5ca5f55d1..f56d2f508 100644
--- a/configure.ac
+++ b/configure.ac
@@ -319,6 +319,11 @@ AS_IF([test x"$VAR_UPNPC_BINARY" != x"false"],
AC_CHECK_PROG(UNCRUSTIFY_BINARY, uncrustify, true)
AM_CONDITIONAL(HAVE_UNCRUSTIFY_BINARY, $UNCRUSTIFY_BINARY)
+# yapf
+# TODO: less repetition, add flag to pass name
+AC_CHECK_PROGS(YAPF_BINARY, [yapf yapf3.0 yapf3.1 yapf3.2 yapf3.3 yapf3.4
yapf3.5 yapf3.6 yapf3.7 yapf3.8 yapf3.9 yapf4.0], false)
+AM_CONDITIONAL(HAVE_YAPF_BINARY, test x$YAPF_BINARY != xfalse)
+
AC_CHECK_MEMBER(struct tm.tm_gmtoff,
[AC_DEFINE(HAVE_TM_GMTOFF, 1,
--
To stop receiving notification emails like this one, please contact
address@hidden.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] [gnunet] branch master updated: add yapf to make pretty,
gnunet <=