Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp209322pxj; Thu, 17 Jun 2021 00:36:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx6V2do4jvdOy5utcCkBe5vq6Q8w3Rli4ydsHMiBRlNHyZyVTtleGzFnkdkHQ9IkPp3cAOA X-Received: by 2002:a17:906:9d05:: with SMTP id fn5mr3709003ejc.133.1623915380660; Thu, 17 Jun 2021 00:36:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623915380; cv=none; d=google.com; s=arc-20160816; b=OVBpOJJh6rd3v+2eRse/0zQx65IA/mzUiajGkxQHJVZ07mPlvEiNMEHIPuVeax4wHW T7G6VbmMSnVtigfDzFQzImroatsCq8y/V74a0xYiewOPvWdwzU7vPvS3SV/FW8xuuVRf aoSCRCu3cSYLhmUqGCaEKMTiTy7gdzdEWIMnwkBmoAx/2QENaEk09uWvWimp+jtZG3Ui nPgMrs7qCx0g4PbWAwV7fk6vScY61wNbbYDYV8KeUgnPTImct5hybggV2V7XsHXRI3eN Ld0zl+7ZB9/Xb2bcclyrEoqS25HV09p9D4lCflSj3xsP9sbSvCcP7wcAItPTCrlj9Txb My7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=O1KNh9awo7kO6txbFNMCKkWZktEbShy4xlE/ypui7qw=; b=TuLPW/t8i5nQoS0Q3F5oE9viaIg1xEpHQZLtFFjtCy7rS78qCbziLw1Lp/VNmTWN83 SCXOfnas5vAESuhpsEbWZORqxuSTrUHfq4BO/5i+S61EeLoi9M5HjMlwyGCmiapvGKux ojC60Hi3oQmuvLFf1WMmGjSCxHDk1wEsgLqpnoGNyVT/mbcTSxoEFTY3qpMagCmfA/jV TqHE7svg9nsuG4JKiR231xGO16yvDpiMSd7/5UlhRDV50PThku/o7Aburt5es0XN/USA FF4e3IxaiOT/MnBn9+wLKw6Zy1aeDxLPt3TsYNsywWc9fuHScBf/JZMULLBXYZk49xqg qhEQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=s5DQJdCi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dg2si4299606edb.424.2021.06.17.00.35.58; Thu, 17 Jun 2021 00:36:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=s5DQJdCi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229868AbhFQHe4 (ORCPT + 99 others); Thu, 17 Jun 2021 03:34:56 -0400 Received: from smtp-out2.suse.de ([195.135.220.29]:55512 "EHLO smtp-out2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229712AbhFQHez (ORCPT ); Thu, 17 Jun 2021 03:34:55 -0400 Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id C39371FDAE; Thu, 17 Jun 2021 07:32:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1623915167; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=O1KNh9awo7kO6txbFNMCKkWZktEbShy4xlE/ypui7qw=; b=s5DQJdCit0YbdgnC0zZLxHBhMnHzCb0Frv9UAFo6//rfM5oR75+zFBdnb1YyDNk8jR5EjJ Fpo9dCKRMIAmWplORNj15LdpGIYf3l+VzzzGYrFKl8d6dBSp2OOMEdAsXXRf6UisJVa/pp rnEH6lufuIyftIjJatEOr7SL8ojBZfw= Received: from suse.cz (unknown [10.100.224.162]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id 21FFBA3BC8; Thu, 17 Jun 2021 07:32:47 +0000 (UTC) Date: Thu, 17 Jun 2021 09:32:46 +0200 From: Petr Mladek To: "Leizhen (ThunderTown)" Cc: Jonathan Corbet , Joe Perches , Andrew Morton , Nicolas Dichtel , Jason Baron , Stefani Seibold , Jacob Keller , Thomas Graf , Herbert Xu , Jens Axboe , Sergey Senozhatsky , Andy Shevchenko , Rasmus Villemoes , linux-kernel Subject: Re: [PATCH v2 1/3] scripts: add spelling_sanitizer.sh script Message-ID: References: <20210616122507.896-1-thunder.leizhen@huawei.com> <20210616122507.896-2-thunder.leizhen@huawei.com> <87bl85yi68.fsf@meer.lwn.net> <4c8ca535-398c-0d19-5242-27ed1d3905ec@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4c8ca535-398c-0d19-5242-27ed1d3905ec@huawei.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu 2021-06-17 09:11:05, Leizhen (ThunderTown) wrote: > > > On 2021/6/16 22:53, Jonathan Corbet wrote: > > Zhen Lei writes: > > > >> The file scripts/spelling.txt recorded a large number of spelling > >> "mistake||correction" pairs. These entries are currently maintained in > >> order, but the results are not strict. In addition, when someone wants to > >> add some new pairs, he either sort them manually or write a script, which > >> is clearly a waste of labor. So add this script. For all spelling > >> "mistake||correction" pairs, sort based on "correction", then on "mistake", > >> and remove duplicates. Sorting based on "mistake" first is not chosen > >> because it is uncontrollable. > >> > >> Signed-off-by: Zhen Lei > >> --- > >> scripts/spelling_sanitizer.sh | 27 +++++++++++++++++++++++++++ > >> 1 file changed, 27 insertions(+) > >> create mode 100755 scripts/spelling_sanitizer.sh > >> > >> diff --git a/scripts/spelling_sanitizer.sh b/scripts/spelling_sanitizer.sh > >> new file mode 100755 > >> index 000000000000..603bb7e0e66b > >> --- /dev/null > >> +++ b/scripts/spelling_sanitizer.sh > >> @@ -0,0 +1,27 @@ > >> +#!/bin/sh -efu > >> +# SPDX-License-Identifier: GPL-2.0 > >> + > >> +# To get the traditional sort order that uses native byte values > > > > So I am of the naive opinion that everything we drop into scripts/ > > should start with a comment saying why it exists and how to use it. > > Otherwise how are people going to benefit from it? > > Rigth, I will add the description, thanks. Ideally, please add also some -h/--help option that would print a short description and usage. Best Regards, Petr