File tree Expand file tree Collapse file tree 3 files changed +87
-0
lines changed Expand file tree Collapse file tree 3 files changed +87
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Typos
2+
3+ permissions :
4+ contents : read
5+
6+ on :
7+ pull_request :
8+ push :
9+
10+ env :
11+ TYPOS_VER : v1.29.1
12+ TYPOS_PLATFORM : x86_64-unknown-linux-musl
13+ CLICOLOR : 1
14+
15+ jobs :
16+ typos :
17+ defaults :
18+ run :
19+ shell : bash
20+ runs-on : ubuntu-latest
21+
22+ steps :
23+
24+ - uses : actions/checkout@v4
25+
26+ - run : |
27+ wget -q https://github.com/crate-ci/typos/releases/download/${{ env.TYPOS_VER }}/typos-${{ env.TYPOS_VER }}-${{ env.TYPOS_PLATFORM }}.tar.gz
28+ tar -xf typos-${{ env.TYPOS_VER }}-${{ env.TYPOS_PLATFORM }}.tar.gz --one-top-level=typos-${{ env.TYPOS_VER }}
29+ mkdir -p "$HOME/.local/bin"
30+ mv typos-${{ env.TYPOS_VER }} "$HOME/.local/bin/typos-${{ env.TYPOS_VER }}"
31+ chmod +x "$HOME/.local/bin/typos-${{ env.TYPOS_VER }}/typos"
32+ echo "$HOME/.local/bin/typos-${{ env.TYPOS_VER }}" >> $GITHUB_PATH
33+
34+ - run : make markdown-typos
35+ - run : make hs-typos
Original file line number Diff line number Diff line change 1+ [type .hs ]
2+ extend-glob = []
3+ extend-ignore-identifiers-re = []
4+ extend-ignore-words-re = []
5+ extend-ignore-re = []
6+
7+ [type .hs .extend-identifiers ]
8+ sIy = " sIy"
9+ vIy = " vIy"
10+ tre = " tre"
11+ inh = " inh"
12+ TypeLits = " TypeLits"
13+ fof = " fof"
14+
15+ [type .hs .extend-words ]
16+ alse = " alse"
Original file line number Diff line number Diff line change 1+ all : help
2+
3+ PHONY : help
4+ help : # # Show the commented targets.
5+ @grep -E ' ^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST ) | \
6+ sort | awk ' BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
7+
8+ PHONY : help-banner
9+ help-banner : # # Show the help banner.
10+ @echo " ===================================================================="
11+ @echo " § all make with no arguments also shows this banner"
12+ @echo " § help make help will list targets with descriptions"
13+ @echo " ===================================================================="
14+
15+ .PHONY : typos-install
16+ typos-install : # # Install typos-cli for typos target using cargo.
17+ cargo install typos-cli
18+
19+ GREP_EXCLUDE := grep -v -E 'dist-'
20+ FIND_NAMED := find . -type f -name
21+
22+ .PHONY : markdown-typos
23+ markdown-typos : # # Find typos in Markdown .md files.
24+ $(FIND_NAMED ) ' *.md' | $(GREP_EXCLUDE ) | xargs typos
25+
26+ .PHONY : markdown-fix-typos
27+ markdown-fix-typos : # # Fix typos in Markdown .md files.
28+ $(FIND_NAMED ) ' *.md' | $(GREP_EXCLUDE ) | xargs typos --write-changes
29+
30+ .PHONY : hs-typos
31+ hs-typos : # # Find typos in Haskell .hs files.
32+ $(FIND_NAMED ) ' *.hs' | $(GREP_EXCLUDE ) | xargs typos
33+
34+ .PHONY : hs-fix-typos
35+ hs-fix-typos : # # Fix typos in Haskell .hs files.
36+ $(FIND_NAMED ) ' *.hs' | $(GREP_EXCLUDE ) | xargs typos --write-changes
You can’t perform that action at this time.
0 commit comments