On Thu, Jan 10, 2019 at 11:49:35AM +0100, Andrea Bolognani wrote:
On Thu, 2019-01-10 at 10:34 +0300, Roman Bolshakov wrote:
> I've run 'make syntax-check' on libvirt's HEAD. It succeeds on
macOS.
> Perhaps we can add syntax-check to .travis.yml?
syntax-check passes on macOS, but it doesn't quite succeed:
[...]
unmarked_diagnostics
vulnerable_makefile_CVE-2009-4029
grep: empty (sub)expression
grep: empty (sub)expression
grep: empty (sub)expression
usage: grep [-abcDEFGHhIiJLlmnOoqRSsUVvwxZ] [-A num] [-B num] [-C[num]]
[-e pattern] [-f file] [--binary-files=value] [--color=when]
[--context[=num]] [--directories=action] [--label] [--line-buffered]
[--null] [pattern] [file ...]
grep: empty (sub)expression
grep: empty (sub)expression
grep: empty (sub)expression
maint.mk: skipping test sc_preprocessor_indentation: cppi not installed
grep: -: No such file or directory
maint.mk: skipping sc_prohibit_always-defined_macros: you lack GNU grep
grep: repetition-operator operand invalid
/usr/bin/sed: illegal option -- r
usage: sed script [-Ealn] [-i extension] [file ...]
sed [-Ealn] [-i extension] [-e script] ... [-f script_file] ... [file ...]
grep: empty (sub)expression
grep: empty (sub)expression
grep: empty (sub)expression
grep: empty (sub)expression
grep: empty (sub)expression
grep: empty (sub)expression
grep: empty (sub)expression
grep: empty (sub)expression
grep: empty (sub)expression
grep: empty (sub)expression
usage: grep [-abcDEFGHhIiJLlmnOoqRSsUVvwxZ] [-A num] [-B num] [-C[num]]
[-e pattern] [-f file] [--binary-files=value] [--color=when]
[--context[=num]] [--directories=action] [--label] [--line-buffered]
[--null] [pattern] [file ...]
maint.mk: skipping test sc_spec_indentation: cppi not installed
149.00 GFDL_version
150.00 TAB_in_indentation
[...]
(From
https://travis-ci.org/andreabolognani/libvirt/jobs/477733819)
If you had time to look into those issues, that would be grand: we
are pretty close to being able to run syntax-check on macOS and
FreeBSD, and any help towards that goal is very much appreciated :)
Perhaps we should install grep, gnu-sed and cppi from homebrew in
.travis.yml to get it working. I have all of them installed on my laptop
and syntax-check passes without the errors for me.
grep provides GNU grep and all the "empty (sub)expression" statements
should be gone if it's installed.
sed on macOS doesn't support "-r flag" but supports "-E".
Novertheless,
prohibit_diagnostic_without_format relies on regular expressions that
are not supported in macOS:
prohibit_diagnostic_without_format
sed: 1: "/\<(|VIR_ERROR|lxcError ...": RE error: empty (sub)expression
We need gnu-sed for the rule.
Thanks,
Roman