DPDK patches and discussions
 help / color / mirror / Atom feed
From: Michael Santana Francisco <msantana@redhat.com>
To: Thomas Monjalon <thomas@monjalon.net>
Cc: dev@dpdk.org, stable@dpdk.org,
	Bruce Richardson <bruce.richardson@intel.com>,
	Van Haaren Harry <harry.van.haaren@intel.com>,
	ramirose@gmail.com
Subject: Re: [dpdk-dev] [dpdk-stable] [PATCH v3 1/2] Enable codespell by default. Can be disabled from config file.
Date: Fri, 1 Mar 2019 15:24:53 -0500	[thread overview]
Message-ID: <5bfdfd39-8d04-dc88-ccc1-16ba9377f9ec@redhat.com> (raw)
In-Reply-To: <7663396.UzxFzaq1Qb@xps>

On 3/1/19 12:51 PM, Thomas Monjalon wrote:
> 01/03/2019 18:43, Thomas Monjalon:
>> 01/03/2019 18:08, Michael Santana:
>>> +# Enable codespell by default. This can be overwritten from a config file.
>>> +# You can also enable codespell by setting DPDK_CHECKPATCH_CODESPELL to a valid path
>>> +# to a dictionary.txt file if your dictionary.txt is not in the default location.
> This line length won't pass chekpatch ;)
>
>> Better to avoid "you" form in such comment.
>>
>>> +DPDK_CHECKPATCH_CODESPELL=enable
> It will override the value if passed with an environment variable.
> You should do the same as for DPDK_CHECKPATCH_LINE_LENGTH.
If I understood you correctly, you want to be able to set these 
parameters via environment variables (and take precedence over any 
variables set in any config file)
The problem is right now that any environment variable is overwritten by 
the variable being set in one of the config files
The only way I can think of doing this would be by saving the DPDK 
variables (passed via environment) to a file or ironically temporary 
variables (which themselves can also be overwritten, so that doesn't 
really solve the problem) before being overwritten, and then restoring 
said variables after the call to source.
This would add extra clutter in checkpatches, but it can be avoided by 
doing it in load-devel-config instead.

So the bottom line is, environment variables take overall precedence, 
then config files, and then default

Does this sound sane enough?
If anyone knows a better way to do this please share.

I am including in DPDK_CHECKPATCH_PATH, because might as well at this 
point.
>
>>>   # Load config options:
>>>   # - DPDK_CHECKPATCH_PATH
>>>   # - DPDK_CHECKPATCH_LINE_LENGTH
>>> +# - DPDK_CHECKPATCH_CODESPELL
>>>   . $(dirname $(readlink -e $0))/load-devel-config
>>>   
>>>   VALIDATE_NEW_API=$(dirname $(readlink -e $0))/check-symbol-change.sh
>>> @@ -13,6 +18,12 @@ length=${DPDK_CHECKPATCH_LINE_LENGTH:-80}
>>>   
>>>   # override default Linux options
>>>   options="--no-tree"
>>> +if [ "$DPDK_CHECKPATCH_CODESPELL" == "enable" ]; then
>> This is a bashism.
>> Standard sh uses a simple =
>>
>> No need for a v4, I can fix it.
> Because of the required change for the env var case,
> please do a v4.
>
>

  reply	other threads:[~2019-03-01 20:24 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-13 19:08 [dpdk-dev] [PATCH 0/2] Minor changes to checkpatches Michael Santana
2019-02-13 19:08 ` [dpdk-dev] [PATCH 1/2] Enable codespell from config file Michael Santana
2019-02-13 19:16   ` Van Haaren, Harry
2019-02-14 14:07     ` Bruce Richardson
2019-02-14  2:50   ` Rami Rosen
2019-02-13 19:08 ` [dpdk-dev] [PATCH 2/2] Fix variable assignment Michael Santana
2019-02-14 19:35 ` [dpdk-dev] [PATCH v2 0/2] Minor changes to checkpatches Michael Santana
2019-02-14 19:35   ` [dpdk-dev] [PATCH v2 1/2] Enable codespell by default. Can be disabled from config file Michael Santana
2019-02-28 11:21     ` Thomas Monjalon
2019-02-28 22:09       ` Michael Santana Francisco
2019-02-28 23:01         ` Thomas Monjalon
2019-02-14 19:35   ` [dpdk-dev] [PATCH v2 2/2] Fix variable assignment Michael Santana
2019-02-28 11:14     ` Thomas Monjalon
2019-02-15 14:02   ` [dpdk-dev] [PATCH v2 0/2] Minor changes to checkpatches Bruce Richardson
2019-03-01 17:08   ` [dpdk-dev] [PATCH v3 " Michael Santana
2019-03-01 17:08     ` [dpdk-dev] [PATCH v3 1/2] Enable codespell by default. Can be disabled from config file Michael Santana
2019-03-01 17:43       ` [dpdk-dev] [dpdk-stable] " Thomas Monjalon
2019-03-01 17:51         ` Thomas Monjalon
2019-03-01 20:24           ` Michael Santana Francisco [this message]
2019-03-01 21:08             ` Thomas Monjalon
2019-03-04 16:59               ` Michael Santana Francisco
2019-03-01 17:08     ` [dpdk-dev] [PATCH v3 2/2] devtools: fix result of svg include check Michael Santana
2019-03-01 17:52       ` [dpdk-dev] [dpdk-stable] " Thomas Monjalon
2019-03-04 10:17         ` David Marchand
2019-03-04 19:07     ` [dpdk-dev] [PATCH v4 0/2] Minor changes to checkpatches Michael Santana
2019-03-04 19:07       ` [dpdk-dev] [PATCH v4 1/2] Enable codespell by default. Can be disabled from config file Michael Santana
2019-03-04 19:07       ` [dpdk-dev] [PATCH v4 2/2] devtools: fix result of svg include check Michael Santana
2019-03-04 21:46       ` [dpdk-dev] [dpdk-stable] [PATCH v4 0/2] Minor changes to checkpatches Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5bfdfd39-8d04-dc88-ccc1-16ba9377f9ec@redhat.com \
    --to=msantana@redhat.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=harry.van.haaren@intel.com \
    --cc=ramirose@gmail.com \
    --cc=stable@dpdk.org \
    --cc=thomas@monjalon.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).