From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9EBDAC48BE5 for ; Wed, 16 Jun 2021 14:54:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 893E461075 for ; Wed, 16 Jun 2021 14:54:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234271AbhFPO4F (ORCPT ); Wed, 16 Jun 2021 10:56:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59068 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234225AbhFPOz7 (ORCPT ); Wed, 16 Jun 2021 10:55:59 -0400 Received: from ms.lwn.net (ms.lwn.net [IPv6:2600:3c01:e000:3a1::42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 67D5CC061574 for ; Wed, 16 Jun 2021 07:53:53 -0700 (PDT) Received: from localhost (unknown [IPv6:2601:281:8300:104d::5f6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ms.lwn.net (Postfix) with ESMTPSA id 4A4201D78; Wed, 16 Jun 2021 14:53:52 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 ms.lwn.net 4A4201D78 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lwn.net; s=20201203; t=1623855232; bh=41okDU2C5ZvjNSnuwv35T/ZXCbIVwVaMm0c2rVcS94U=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=nrKkPYHmG7/s/oaouDPDpNCML6Bfixit7TBDVYWz7CvbB+f8LHITzPCizHSJ0M660 2iYHlj0+YAT0Q0pdIa0CsTVr+wEGabQ+Lz3wJQ1HCN5nVIzUzh0Fz8Bpd9A/btUz6i hmE/+4MqGcu0CSv6B95mOZS/rfmIOMyuzbOLybzB2x4WJqZHzQgfqs4vqvEWZ/Vu1G vjK06NDQzV9ZkTB465tqVmlpIYh/a0nXNoslX2bCwrViYxuwHotGP9cQKY4auu04gd hJFRzEI3Ai9mXDzdjCGT3xL7DP7WHSXWVqunIKQKL73nbxw+2G/ED8GmAd5UUStYbH QH0q4+FanyBgg== From: Jonathan Corbet To: Zhen Lei , Joe Perches , Andrew Morton , Nicolas Dichtel , Jason Baron , Stefani Seibold , Jacob Keller , Thomas Graf , Herbert Xu , Jens Axboe , Petr Mladek , Sergey Senozhatsky , Andy Shevchenko , Rasmus Villemoes , linux-kernel Cc: Zhen Lei Subject: Re: [PATCH v2 1/3] scripts: add spelling_sanitizer.sh script In-Reply-To: <20210616122507.896-2-thunder.leizhen@huawei.com> References: <20210616122507.896-1-thunder.leizhen@huawei.com> <20210616122507.896-2-thunder.leizhen@huawei.com> Date: Wed, 16 Jun 2021 08:53:51 -0600 Message-ID: <87bl85yi68.fsf@meer.lwn.net> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? Thanks, jon