From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 6035EA034F; Fri, 12 Nov 2021 20:23:56 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E027B40E25; Fri, 12 Nov 2021 20:23:55 +0100 (CET) Received: from mail-pj1-f43.google.com (mail-pj1-f43.google.com [209.85.216.43]) by mails.dpdk.org (Postfix) with ESMTP id 67CCE40692 for ; Fri, 12 Nov 2021 20:23:54 +0100 (CET) Received: by mail-pj1-f43.google.com with SMTP id fv9-20020a17090b0e8900b001a6a5ab1392so8419142pjb.1 for ; Fri, 12 Nov 2021 11:23:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Mloam5Ei9xdld9n65l3kSS1Ey4VehoBQ18E6UGYw0lk=; b=FW5Yr2GBnKahw1ceP0k9zLj+DO9ZJVp2W4vnFyIN1QQmypwqJ9po+VHqJqThiDoFQc SgaucatPVDLhgxWQ3pFVR71x8S6yqs/HiDaGWu5ZE4NeRViQPAhOSycj+sr2R5fIL/dw kUlaYobWDlTRhl0OwLK1tMNoR6tWN9+rZTg3m+1tCyjxIL0I6sDk/UrAZGvfM0/yoOYu tL5iByZxs5gJYmdKMrI1GwKm0jHZDPlxz07gwPl1sc9nF0Q/gzOXXn2AYEWdo/UBUoLB 35KiwE3AYW5iDVkRTNuw9cA2wnpgjM1dDpy5oZnJB0er1AuwPyEhJ0MVXzLstwiFBgrW B+9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Mloam5Ei9xdld9n65l3kSS1Ey4VehoBQ18E6UGYw0lk=; b=xbw4TIywLB037kzaUw5jQsiBqqmW7KFNfj2NrppbXmDjJ0E3jsgqC7+PBBzMp58pby QsWOZURcr285xHr0xQ/UYWiuLz88xGn+WjXGAGsqDMliufcWYGQ2qERsLsEu4CQ16cWJ UgcYCOlBeBiTi2m7Hmq+V3roMZDTCOT0KtqUXlhrayRVJm0ERzeregm14s1393PKdXyJ 45R6O+SSjDxr+mzwlDxw+lMUHBjUsyuGoCKd5PugBNkMx/Kw1Ep3HmDmm3APkVW92vjG E3y4X2D3XJC0mw7jcIG8lHcIX4l3Yu9fJY1E1MQIGCO361FXS0/5wUHz7yaFsJzch2xa IFwg== X-Gm-Message-State: AOAM533j81GgT5HnZgDK50NHpLDuNYqIJP1sZoXOdF2Cx01AvHaQpEK4 wg4m3PbIIMMl15zEugINFcGqrg== X-Google-Smtp-Source: ABdhPJwOCrAwgRFQoyp2KZ06T5UWd0afQb24qQEjUdzdrBS63habcq+UYiK00fSLKyc/7Rzepn9SaA== X-Received: by 2002:a17:90a:be10:: with SMTP id a16mr20199830pjs.133.1636745033409; Fri, 12 Nov 2021 11:23:53 -0800 (PST) Received: from hermes.local (204-195-33-123.wavecable.com. [204.195.33.123]) by smtp.gmail.com with ESMTPSA id h4sm12137938pjm.14.2021.11.12.11.23.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Nov 2021 11:23:52 -0800 (PST) Date: Fri, 12 Nov 2021 11:23:50 -0800 From: Stephen Hemminger To: Henry Nadeau Cc: dev@dpdk.org Subject: Re: [PATCH v2] devtools: spell check Message-ID: <20211112112350.3011f0bd@hermes.local> In-Reply-To: <20211112181444.168035-1-hnadeau@iol.unh.edu> References: <20211112181444.168035-1-hnadeau@iol.unh.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Fri, 12 Nov 2021 13:14:45 -0500 Henry Nadeau wrote: > +# Compares diff between current branch and it's remote counterpart > +if [ ! $all_check = 'true' ]; then > + git diff "$branch" origin/"$remote_branch" --name-only | > + grep ".*\.rst" | > + # run the spellcheck function over each file in parallel, appending > + # misspellings to the output file > + parallel -j "$(nproc)" spellcheck_file {} "$allowed_words" "$dpdk_dir" \ > + "$regex_pattern" >> "$output" > + else > + cd "$dpdk_dir" > + find . -name "*.rst" -type f | parallel -j "$(nproc)" spellcheck_file {} \ > + "$allowed_words" "$dpdk_dir" "$regex_pattern" >>"$output" > +fi > + > + > +cat "$output" > + > +# remove empty lines in the output > +sed -i '/^$/d' "$output" > + > +# Errors can be counted by counting the number of lines in the output > +errors="$(wc -l "$output" | cut -d ' ' -f 1)" > +printf "Errors found: %d\n" "$errors" | tee -a "$output" > + > +# Make the exit code the number of errors > +exit "$errors" Seems like this is adding alot of git stuff to what could just be a tool to report the spelling errors in the current branch.