Add typo checker

This commit is contained in:
spacewander 2023-06-19 21:51:53 +08:00
parent 5d7ed18c50
commit ba9e6f0c5c
12 changed files with 75 additions and 123 deletions

1
.github/.ignore_words vendored Normal file
View file

@ -0,0 +1 @@
gool

View file

@ -6,15 +6,17 @@ on:
branches: [master]
jobs:
lint:
runs-on: 'ubuntu-22.04'
runs-on: 'ubuntu-latest'
steps:
- name: 'Get Changed Files'
id: 'files'
uses: 'masesgroup/retrieve-changed-files@v2'
with:
format: 'json'
# a force push will cause the action above to fail. Don't do force push when people are
# reviewing!
- name: Check out code.
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: 'Check EditorConfig Lint'
run: |
sudo apt install -y jq golang
@ -23,17 +25,27 @@ jobs:
readarray -t changed_files <<<"$(jq -r '.[]' <<<'${{ steps.files.outputs.added_modified }}')"
~/go/bin/editorconfig-checker ${changed_files[@]}
typo:
runs-on: ubuntu-latest
steps:
- name: Check out code.
uses: actions/checkout@v3
- name: spell check
run: |
pip install codespell==2.2
git grep --cached -l '' | grep -v -e 'History\.md' -e 'AUTHORS' -e 'man/.*\.1' -e 'man/.*\.html' | xargs codespell --ignore-words=.github/.ignore_words
build:
strategy:
fail-fast: false
matrix:
platform:
- ubuntu-22.04
- ubuntu-latest
- macos-latest
runs-on: ${{ matrix.platform }}
steps:
- name: Check out code.
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Linux Install
if: matrix.platform == 'ubuntu-22.04'
run: |

View file

@ -176,8 +176,8 @@ authors :
1 Guillermo Rauch 0.6%
```
This command can also take a *commitish*, and will print a summary for commits in
the commitish range:
This command can also take a *committish*, and will print a summary for commits in
the committish range:
```bash
$ git summary v42..

View file

@ -1,7 +1,7 @@
#!/usr/bin/env bash
echo -n "Sure? - This command may delete files that cannot be recovered. Files and directories in .gitignore will be preserved [y/N]: "
read -r ans
if [ "$ans" == "y" ]
read -r answer
if [ "$answer" == "y" ]
then git clean -d -f && git reset --hard
fi

View file

@ -227,7 +227,7 @@ git_output() {
echo ""
fi
fi
# TODO optimize:return if the latest commit of a branch is eariler than the 'since' day
# TODO optimize:return if the latest commit of a branch is earlier than the 'since' day
done
else
# shellcheck disable=SC2086

View file

@ -195,7 +195,7 @@ uncommitted_changes_count() {
}
COLUMN_CMD_DELIMTER="¬" # Hopefully, this symbol is not used in branch names... I use it as a seperator for columns
COLUMN_CMD_DELIMTER="¬" # Hopefully, this symbol is not used in branch names... I use it as a separator for columns
SP="$COLUMN_CMD_DELIMTER|"
print_summary_by_line() {

View file

@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "GIT\-MAGIC" "1" "October 2021" "" "Git Extras"
.TH "GIT\-MAGIC" "1" "May 2023" "" "Git Extras"
.
.SH "NAME"
\fBgit\-magic\fR \- Automate add/commit/push routines
@ -10,7 +10,7 @@
\fBgit\-magic\fR [\-a] [\-m \fImsg\fR] [\-e] [\-p] [\-f]
.
.SH "DESCRIPTION"
Produces summary of changes for commit message from \fBgit status \-\-porcelain\fR output\. Commits staged changes with the generated commit message and opens editor to modify generated commit message optionally\. Also staging and pushing can be automated optinally\.
Produces summary of changes for commit message from \fBgit status \-\-porcelain\fR output\. Commits staged changes with the generated commit message and opens editor to modify generated commit message optionally\. Also staging and pushing can be automated optionally\.
.
.SH "OPTIONS"
\-a
@ -93,7 +93,7 @@ Date: Thu Sep 30 20:14:22 2021 +0300
.IP "" 0
.
.SH "AUTHOR"
Written by Alper S\. Soylu \fI54alpersaid@gmail\.com\fR
Written by Alper S\. Soylu <54alpersaid@gmail\.com>
.
.SH "REPORTING BUGS"
<\fIhttps://github\.com/tj/git\-extras/issues\fR>

View file

@ -83,7 +83,7 @@
<p>Produces summary of changes for commit message from <code>git status --porcelain</code> output.
Commits staged changes with the generated commit message and
opens editor to modify generated commit message optionally.
Also staging and pushing can be automated optinally.</p>
Also staging and pushing can be automated optionally.</p>
<h2 id="OPTIONS">OPTIONS</h2>
@ -145,7 +145,7 @@ Date: Thu Sep 30 20:14:22 2021 +0300
<h2 id="AUTHOR">AUTHOR</h2>
<p>Written by Alper S. Soylu <a href="&#x6d;&#x61;&#105;&#x6c;&#x74;&#x6f;&#58;&#x35;&#x34;&#97;&#x6c;&#112;&#x65;&#114;&#115;&#x61;&#105;&#x64;&#x40;&#103;&#x6d;&#x61;&#x69;&#108;&#46;&#x63;&#x6f;&#x6d;" data-bare-link="true">&#x35;&#52;&#x61;&#108;&#x70;&#x65;&#x72;&#x73;&#97;&#105;&#100;&#64;&#103;&#109;&#97;&#105;&#108;&#46;&#x63;&#111;&#x6d;</a></p>
<p>Written by Alper S. Soylu &lt;54alpersaid@gmail.com></p>
<h2 id="REPORTING-BUGS">REPORTING BUGS</h2>
@ -158,7 +158,7 @@ Date: Thu Sep 30 20:14:22 2021 +0300
<ol class='man-decor man-foot man foot'>
<li class='tl'></li>
<li class='tc'>October 2021</li>
<li class='tc'>May 2023</li>
<li class='tr'>git-magic(1)</li>
</ol>

View file

@ -10,7 +10,7 @@ git-magic(1) -- Automate add/commit/push routines
Produces summary of changes for commit message from `git status --porcelain` output.
Commits staged changes with the generated commit message and
opens editor to modify generated commit message optionally.
Also staging and pushing can be automated optinally.
Also staging and pushing can be automated optionally.
## OPTIONS

View file

@ -1,86 +1,58 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "GIT\-SUMMARY" "1" "February 2023" "" "Git Extras"
.
.\" generated with Ronn-NG/v0.9.1
.\" http://github.com/apjanke/ronn-ng/tree/0.9.1
.TH "GIT\-SUMMARY" "1" "June 2023" "" "Git Extras"
.SH "NAME"
\fBgit\-summary\fR \- Show repository summary
.
.SH "SYNOPSIS"
\fBgit\-summary\fR [\-\-dedup\-by\-email] [\-\-no\-merges] [<committish>]
.
.br
.P
\fBgit\-summary\fR \-\-line [<path>]
.
.SH "DESCRIPTION"
Shows a summary of the repository or a path within it\.
.
.SH "OPTIONS"
<committish>
.
.P
Summarize only the range of commits included in the <committish>\.
.
.P
<path>
.
.P
Summarize only the range of files included in the <path>\.
.
.P
\-\-dedup\-by\-email
.
.P
Remove duplicate authors who belong to the same email address\. For example,
.
.IP "" 4
.
.nf
$ git summary
\.\.\.
\|\.\|\.\|\.
133 TJ Holowaychuk 9\.9%
115 Tj Holowaychuk 8\.5%
$ git summary \-\-dedup\-by\-email
\.\.\.
\|\.\|\.\|\.
248 TJ Holowaychuk 18\.4%
.
.fi
.
.IP "" 0
.
.P
\-\-no\-merges
.
.P
Exclude merge commits\.
.
.P
\-\-line
.
.P
Summarize with lines other than commits\. When \fB\-\-line\fR is specified, the last argument is treated as <path>\.
.
.P
This option can not be used together with \fB\-\-dedup\-by\-email\fR or \fB\-\-no\-merges\fR\.
.
.P
\-\-output\-style <style>
.
.P
Summarizes the repository and print the output accoring to the specified style\. Styles: * \fBtabular\fR: Prints the summary in a tabular form having a header in the first line and the values in the second\. Column separator is a \fB|\fR sorrounded by at least one space on each side\. * \fBoneline\fR: Prints the summary in a single line\. Fields are separated by a \fB/\fR sorrounded by one space on each side\.
.
Summarizes the repository and print the output according to the specified style\. Styles: * \fBtabular\fR: Prints the summary in a tabular form having a header in the first line and the values in the second\. Column separator is a \fB|\fR sorrounded by at least one space on each side\. * \fBoneline\fR: Prints the summary in a single line\. Fields are separated by a \fB/\fR sorrounded by one space on each side\.
.P
Some information like the authors cannot be displayed in this mode\.
.
.SH "EXAMPLES"
Outputs a repo summary:
.
.IP "" 4
.
.nf
$ git summary
project : express
@ -110,94 +82,59 @@ authors :
1 ewoudj
1 isaacs
1 Matt Colyer
.
.fi
.
.IP "" 0
.
.P
This command can also take a committish, and will print a summary for the range of commits included in the committish:
.
.IP "" 4
.
.nf
$ git summary v42\.\.
.
.fi
.
.IP "" 0
.
.P
Outputs a repo summary by line:
.
.IP "" 4
.
.nf
$ git summary \-\-line
project : git\-extras
lines : 26820
authors :
\.\.\.
.
\|\.\|\.\|\.
.fi
.
.IP "" 0
.
.P
Filter with the path:
.
.IP "" 4
.
.nf
$ git summary \-\-line bin/
project : git\-extras
lines : 4420
authors :
\.\.\.
.
\|\.\|\.\|\.
.fi
.
.IP "" 0
.
.P
Tabular summary
.
.IP "" 4
.
.nf
$ git summary \-\-output\-style tabular
# Repo | Age | Last active | Active on | Commits | Uncommitted | Branch
git\-extras | 13 years | 7 hours ago | 807 days | 1703 | 3 | master
.
.fi
.
.IP "" 0
.
.P
Oneline summary
.
.IP "" 4
.
.nf
$ git summary \-\-output\-style oneline
git\-extras / age: 13 years / last active: 7 hours ago / active on 807 days / commits: 1703 / uncommitted: 3 / branch: master
.
.fi
.
.IP "" 0
.
.SH "AUTHOR"
Written by Tj Holowaychuk <\fItj@vision\-media\.ca\fR>
.
.SH "REPORTING BUGS"
<\fIhttps://github\.com/tj/git\-extras/issues\fR>
.
.SH "SEE ALSO"
<\fIhttps://github\.com/tj/git\-extras\fR>

View file

@ -1,8 +1,8 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv='content-type' value='text/html;charset=utf8'>
<meta name='generator' value='Ronn/v0.7.3 (http://github.com/rtomayko/ronn/tree/0.7.3)'>
<meta http-equiv='content-type' content='text/html;charset=utf8'>
<meta name='generator' content='Ronn-NG/v0.9.1 (http://github.com/apjanke/ronn-ng/tree/0.9.1)'>
<title>git-summary(1) - Show repository summary</title>
<style type='text/css' media='all'>
/* style: man */
@ -69,15 +69,17 @@
<li class='tr'>git-summary(1)</li>
</ol>
<h2 id="NAME">NAME</h2>
<h2 id="NAME">NAME</h2>
<p class="man-name">
<code>git-summary</code> - <span class="man-whatis">Show repository summary</span>
</p>
<h2 id="SYNOPSIS">SYNOPSIS</h2>
<p> <code>git-summary</code> [--dedup-by-email] [--no-merges] [&lt;committish&gt;]<br />
<code>git-summary</code> --line [&lt;path&gt;]</p>
<p><code>git-summary</code> [--dedup-by-email] [--no-merges] [&lt;committish&gt;]</p>
<p><code>git-summary</code> --line [&lt;path&gt;]</p>
<h2 id="DESCRIPTION">DESCRIPTION</h2>
@ -85,17 +87,17 @@
<h2 id="OPTIONS">OPTIONS</h2>
<p> &lt;committish&gt;</p>
<p>&lt;committish&gt;</p>
<p> Summarize only the range of commits included in the &lt;committish&gt;.</p>
<p>Summarize only the range of commits included in the &lt;committish&gt;.</p>
<p> &lt;path&gt;</p>
<p>&lt;path&gt;</p>
<p> Summarize only the range of files included in the &lt;path&gt;.</p>
<p>Summarize only the range of files included in the &lt;path&gt;.</p>
<p> --dedup-by-email</p>
<p>--dedup-by-email</p>
<p> Remove duplicate authors who belong to the same email address.
<p>Remove duplicate authors who belong to the same email address.
For example,</p>
<pre><code>$ git summary
@ -108,20 +110,20 @@ $ git summary --dedup-by-email
248 TJ Holowaychuk 18.4%
</code></pre>
<p> --no-merges</p>
<p>--no-merges</p>
<p> Exclude merge commits.</p>
<p>Exclude merge commits.</p>
<p> --line</p>
<p>--line</p>
<p> Summarize with lines other than commits.
<p>Summarize with lines other than commits.
When <code>--line</code> is specified, the last argument is treated as &lt;path&gt;.</p>
<p> This option can not be used together with <code>--dedup-by-email</code> or <code>--no-merges</code>.</p>
<p>This option can not be used together with <code>--dedup-by-email</code> or <code>--no-merges</code>.</p>
<p> --output-style &lt;style&gt;</p>
<p>--output-style &lt;style&gt;</p>
<p> Summarizes the repository and print the output accoring to the specified style.
<p>Summarizes the repository and print the output according to the specified style.
Styles:
* <code>tabular</code>: Prints the summary in a tabular form having a header in the
first line and the values in the second. Column separator is a <code>|</code>
@ -129,11 +131,11 @@ $ git summary --dedup-by-email
* <code>oneline</code>: Prints the summary in a single line. Fields are separated by a <code>/</code>
sorrounded by one space on each side.</p>
<p> Some information like the authors cannot be displayed in this mode.</p>
<p>Some information like the authors cannot be displayed in this mode.</p>
<h2 id="EXAMPLES">EXAMPLES</h2>
<p> Outputs a repo summary:</p>
<p>Outputs a repo summary:</p>
<pre><code>$ git summary
@ -166,13 +168,13 @@ authors :
1 Matt Colyer
</code></pre>
<p> This command can also take a committish, and will print a summary for the range
<p>This command can also take a committish, and will print a summary for the range
of commits included in the committish:</p>
<pre><code>$ git summary v42..
</code></pre>
<p> Outputs a repo summary by line:</p>
<p>Outputs a repo summary by line:</p>
<pre><code>$ git summary --line
@ -182,7 +184,7 @@ authors :
...
</code></pre>
<p> Filter with the path:</p>
<p>Filter with the path:</p>
<pre><code>$ git summary --line bin/
@ -192,14 +194,14 @@ authors :
...
</code></pre>
<p> Tabular summary</p>
<p>Tabular summary</p>
<pre><code>$ git summary --output-style tabular
# Repo | Age | Last active | Active on | Commits | Uncommitted | Branch
git-extras | 13 years | 7 hours ago | 807 days | 1703 | 3 | master
</code></pre>
<p> Oneline summary</p>
<p>Oneline summary</p>
<pre><code>$ git summary --output-style oneline
git-extras / age: 13 years / last active: 7 hours ago / active on 807 days / commits: 1703 / uncommitted: 3 / branch: master
@ -207,7 +209,7 @@ git-extras / age: 13 years / last active: 7 hours ago / active on 807 days / com
<h2 id="AUTHOR">AUTHOR</h2>
<p>Written by Tj Holowaychuk &lt;<a href="&#x6d;&#x61;&#105;&#108;&#x74;&#x6f;&#x3a;&#x74;&#106;&#x40;&#118;&#105;&#x73;&#105;&#x6f;&#x6e;&#x2d;&#x6d;&#101;&#100;&#x69;&#97;&#x2e;&#x63;&#97;" data-bare-link="true">&#116;&#106;&#x40;&#118;&#x69;&#115;&#x69;&#111;&#110;&#45;&#x6d;&#x65;&#x64;&#x69;&#x61;&#46;&#x63;&#97;</a>&gt;</p>
<p>Written by Tj Holowaychuk &lt;<a href="mailto:tj@vision-media.ca" data-bare-link="true">tj@vision-media.ca</a>&gt;</p>
<h2 id="REPORTING-BUGS">REPORTING BUGS</h2>
@ -217,10 +219,9 @@ git-extras / age: 13 years / last active: 7 hours ago / active on 807 days / com
<p>&lt;<a href="https://github.com/tj/git-extras" data-bare-link="true">https://github.com/tj/git-extras</a>&gt;</p>
<ol class='man-decor man-foot man foot'>
<li class='tl'></li>
<li class='tc'>February 2023</li>
<li class='tc'>June 2023</li>
<li class='tr'>git-summary(1)</li>
</ol>

View file

@ -3,8 +3,9 @@ git-summary(1) -- Show repository summary
## SYNOPSIS
`git-summary` [--dedup-by-email] [--no-merges] [&lt;committish&gt;]
`git-summary` --line [&lt;path&gt;]
`git-summary` [--dedup-by-email] [--no-merges] [&lt;committish&gt;]
`git-summary` --line [&lt;path&gt;]
## DESCRIPTION
@ -47,10 +48,10 @@ Shows a summary of the repository or a path within it.
--output-style &lt;style&gt;
Summarizes the repository and print the output accoring to the specified style.
Summarizes the repository and print the output according to the specified style.
Styles:
* `tabular`: Prints the summary in a tabular form having a header in the
first line and the values in the second. Column separator is a `|`
* `tabular`: Prints the summary in a tabular form having a header in the
first line and the values in the second. Column separator is a `|`
sorrounded by at least one space on each side.
* `oneline`: Prints the summary in a single line. Fields are separated by a `/`
sorrounded by one space on each side.