Skip to content

Commit

Permalink
Deal with editor-config lints
Browse files Browse the repository at this point in the history
  • Loading branch information
alerque committed Sep 21, 2023
1 parent 969fddc commit 87c9912
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 32 deletions.
14 changes: 13 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,19 @@ root = true
[*]
end_of_line = lf
insert_final_newline = true
charset = utf-8
trim_trailing_whitespace = true

[{Makefile*,*.mk,*.mk.in}]
indent_style = tab
indent_size = 4

[*.m4]
indent_style = space
indent_size = 8

[*.md]
trim_trailing_whitespace = false

[{vcsh.in,completions/vcsh.*}]
indent_style = tab
trim_trailing_whitespace = true
53 changes: 26 additions & 27 deletions build-aux/ax_prog_perl_modules.m4
Original file line number Diff line number Diff line change
Expand Up @@ -38,40 +38,39 @@ AU_ALIAS([AC_PROG_PERL_MODULES], [AX_PROG_PERL_MODULES])
AC_DEFUN([AX_PROG_PERL_MODULES],[dnl
m4_define([ax_perl_modules])
m4_foreach([ax_perl_module], m4_split(m4_normalize([$1])),
[
m4_append([ax_perl_modules],
[']m4_bpatsubst(ax_perl_module,=,[ ])[' ])
])
m4_foreach([ax_perl_module], m4_split(m4_normalize([$1])), [
m4_append([ax_perl_modules],
[']m4_bpatsubst(ax_perl_module,=,[ ])[' ])
])
# Make sure we have perl
if test -z "$PERL"; then
AC_CHECK_PROG(PERL,perl,perl)
AC_CHECK_PROG(PERL,perl,perl)
fi
if test "x$PERL" != x; then
ax_perl_modules_failed=0
for ax_perl_module in ax_perl_modules; do
AC_MSG_CHECKING(for perl module $ax_perl_module)
ax_perl_modules_failed=0
for ax_perl_module in ax_perl_modules; do
AC_MSG_CHECKING(for perl module $ax_perl_module)
# Would be nice to log result here, but can't rely on autoconf internals
$PERL -e "use $ax_perl_module; exit" > /dev/null 2>&1
if test $? -ne 0; then
AC_MSG_RESULT(no);
ax_perl_modules_failed=1
else
AC_MSG_RESULT(ok);
fi
done
# Would be nice to log result here, but can't rely on autoconf internals
$PERL -e "use $ax_perl_module; exit" > /dev/null 2>&1
if test $? -ne 0; then
AC_MSG_RESULT(no);
ax_perl_modules_failed=1
else
AC_MSG_RESULT(ok);
fi
done
# Run optional shell commands
if test "$ax_perl_modules_failed" = 0; then
:
$2
else
:
$3
fi
# Run optional shell commands
if test "$ax_perl_modules_failed" = 0; then
:
$2
else
:
$3
fi
else
AC_MSG_WARN(could not find perl)
AC_MSG_WARN(could not find perl)
fi])dnl
6 changes: 3 additions & 3 deletions build-aux/ax_progvar.m4
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
AC_DEFUN([AX_PROGVAR], [
test -n "$m4_toupper($1)" || { AC_PATH_PROG(m4_toupper($1), m4_default($2,$1)) }
test -n "$m4_toupper($1)" || AC_MSG_ERROR([m4_default($2,$1) is required])
])
test -n "$m4_toupper($1)" || { AC_PATH_PROG(m4_toupper($1), m4_default($2,$1)) }
test -n "$m4_toupper($1)" || AC_MSG_ERROR([m4_default($2,$1) is required])
])

2 changes: 1 addition & 1 deletion doc/sample_hooks/pre-merge-unclobber
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
# the now-renamed files.

for object in $(git ls-tree -r origin/master | awk '{print $4}'); do
[ -e "$object" ] && mv "$object" "$object.vcsh-unclobber"
[ -e "$object" ] && mv "$object" "$object.vcsh-unclobber"
done

0 comments on commit 87c9912

Please sign in to comment.