[dpdk-dev] [PATCH v2] devtools: add explicit warning messages for forbidden tokens

Thomas Monjalon thomas at monjalon.net
Fri Nov 2 11:43:12 CET 2018


02/11/2018 11:37, Arnon Warshavsky:
> >
> > > +     message="Using explicit .svg extension in figures instead of .*"
> > >       awk -v FOLDERS='doc' \
> > >               -v EXPRESSIONS='::[[:space:]]*[^[:space:]]*\\.svg' \
> > >               -v RET_ON_FAIL=1 \
> > > +             -v MESSAGE="$message" \
> > >               -f $(dirname $(readlink -e $0))/check-forbidden-tokens.awk
> > \
> > >               "$1"
> > >  }
> >
> > Why using a variable for message in the second check?
> >
> >
> > This was to avoid the 80 characters long line warning I get.
> It also seems more convenient should there be a need for multi-line
> messages.
> Is there a more preferred way in such a case of a passed parameter?

I think I prefer passing the string directly.
You can make a shorter message:
	Using explicit .svg extension in rST instead of .*
or
	Using explicit .svg extension instead of .*




More information about the dev mailing list