From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by dpdk.org (Postfix) with ESMTP id 072284C91 for ; Fri, 1 Mar 2019 00:02:04 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id A3B0A22247; Thu, 28 Feb 2019 18:02:03 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Thu, 28 Feb 2019 18:02:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=mesmtp; bh=8qaZfbZ1TClh8gDqrwp455goEp77+u5rOZ5cOQZ6JEk=; b=O9Fz8M7gk8bc wnrZRc1eCYCqGj79N5kGoBaoJ6HwN29Zo1FzUmTMzSQKVtCo53VEi208ylzOTiK5 xf1N/gB5rcBaLBNYRXXWph1rbxDBNHBO0dC74rYmY7T3KCZWjSKa9ssDj7iJ/ZA9 Yv5w240L88TZSO263EVZUxQQsyhp3AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=8qaZfbZ1TClh8gDqrwp455goEp77+u5rOZ5cOQZ6J Ek=; b=peaZ7b9RImAetEJqo3Oa8lXKkEPOCIKUnflZKqdQd+CWAnSTaGPctn7yH EMlDPV1aW2CWaBSIoVJn2lyZosdKHu/rzlBkW9Ozp38Zu7b5DgmeQKi66oEHcHLS 5JCFcVvI0eHomA9sYbg2NhUT79wyRG15r9pkXhZQIQ6NlpkG08iGPq0Spr13ivfB wXCUJXa0Adl1Z1Zh0Gh71bTnmnGIlg2ApYZ/6voA0lbT7oDkBpJwVho5/0y/ial6 g6JdJT/RI10nepbJO6Zq55hsXu/UiIzHnzFi4oZUzLGPvi5DOcJMliL2YjRqBIk4 zGxX3dH78yT5St8UgGAzV1IOos4EA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedutddrvdeggddtjecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhmrghs ucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenucfkph epleefrdeirddugeelrdduudegnecurfgrrhgrmhepmhgrihhlfhhrohhmpehthhhomhgr shesmhhonhhjrghlohhnrdhnvghtnecuvehluhhsthgvrhfuihiivgeptd X-ME-Proxy: Received: from xps.localnet (114.149.6.93.rev.sfr.net [93.6.149.114]) by mail.messagingengine.com (Postfix) with ESMTPA id 677DF10312; Thu, 28 Feb 2019 18:02:01 -0500 (EST) From: Thomas Monjalon To: msantana@redhat.com Cc: dev@dpdk.org, Van Haaren Harry , ramirose@gmail.com, Bruce Richardson Date: Fri, 01 Mar 2019 00:01:57 +0100 Message-ID: <1841609.ZLcW5ieq3c@xps> In-Reply-To: References: <20190213190813.12702-1-msantana@redhat.com> <4146661.2v2ioqZAr6@xps> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v2 1/2] Enable codespell by default. Can be disabled from config file. X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Feb 2019 23:02:04 -0000 28/02/2019 23:09, Michael Santana Francisco: > On 2/28/19 6:21 AM, Thomas Monjalon wrote: > > 14/02/2019 20:35, Michael Santana: > >> Enable codespell by default. > >> codespell is a feature by checkpatch.pl that > >> checks for common spelling mistakes in patches. > > What is the difference between codespell and spelling.txt included > > with checkpatch? > > Is it just a different dictionary? > codespell has a larger dictionary, about 15000 word fixes whereas > spelling.txt has about 1000. > That's really the only big difference OK > >> This feature is disabled by default. To enable it one must add > >> the '--codespell' flag to the $options variable in > >> checkpatches.sh. > > We need also to specify the dictionary path if not in > > /usr/share/codespell/dictionary.txt > > In my case, it is in /usr/lib/python3.7/site-packages/codespell_lib/data/dictionary.txt > > > >> With this change codespell is enabled by default. > > It seems it is not enabled by default, > > because we need DPDK_CHECKPATCH_CODESPELL=enable > V2 sets DPDK_CHECKPATCH_CODESPELL=enable at the beginning of > checkpatches, right before reading in the config files. > If DPDK_CHECKPATCH_CODESPELL is set in one of the config files it > overwrites the enabled by default. > This way a user can disable it via a config file OK I missed it. > >> The user can decide to turn off codespell from a one of the config > >> files read by checkpatches.sh. > > [...] > >> # override default Linux options > >> options="--no-tree" > >> +if [ "$DPDK_CHECKPATCH_CODESPELL" == "enable" ]; then > > What about allowing either "enable" or a path? > > If it is a path (have some slash), then we can add --codespellfile option. > I like your thinking. We can use `if [ -f ]` to see if the path > given is an existing file. > so, if DPDK_CHECKPATCH_CODESPELL is set to enable, then enable it with > default path (the way it is right now) > if DPDK_CHECKPATCH_CODESPELL is set to a valid path to a file then > enable codespell and set --codespellfile to said file > otherwise if it's not set to enable or set to a valid path file, then > assume it's disabled. > Missed anything? Well described. Would be nice to see in v3. Thanks