From: Stephen Hemminger <stephen@networkplumber.org>
To: Henry Nadeau <hnadeau@iol.unh.edu>
Cc: dev@dpdk.org
Subject: Re: [PATCH v2] devtools: spell check
Date: Fri, 12 Nov 2021 11:23:50 -0800 [thread overview]
Message-ID: <20211112112350.3011f0bd@hermes.local> (raw)
In-Reply-To: <20211112181444.168035-1-hnadeau@iol.unh.edu>
On Fri, 12 Nov 2021 13:14:45 -0500
Henry Nadeau <hnadeau@iol.unh.edu> 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.
next prev parent reply other threads:[~2021-11-12 19:23 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-12 18:14 [PATCH v2] devtools: spell check Henry Nadeau
2021-11-12 19:23 ` Stephen Hemminger [this message]
2021-12-01 14:47 ` [PATCH v3] " Henry Nadeau
2021-12-01 16:59 ` [PATCH v4] " Henry Nadeau
2022-01-20 15:10 ` 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=20211112112350.3011f0bd@hermes.local \
--to=stephen@networkplumber.org \
--cc=dev@dpdk.org \
--cc=hnadeau@iol.unh.edu \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.