Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

For Good #168

Open
wants to merge 44 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
a696af0
add several words
dixudx Feb 9, 2018
de33a23
add a word in DocMain: retrive -> retrieve
usk81 May 11, 2018
df0cfa3
add word: "on-premise" -> "on-premises"
ybiquitous Aug 9, 2018
86e30f6
Merge remote-tracking branch 'dixudx/add_words'
jirfag Aug 9, 2018
99b5b32
Merge remote-tracking branch 'usk81/add-typo-word-in-main-dic'
jirfag Aug 9, 2018
950f5d1
Merge remote-tracking branch 'ybiquitous/patch-1'
jirfag Aug 9, 2018
687d47b
chore: use Go module
ldez Oct 11, 2022
be58de5
chore: remove travis
ldez Oct 11, 2022
a5f4bc6
doc: fix typos
ldez Oct 11, 2022
03f9fe9
chore: update goreleaser configuration
ldez Oct 11, 2022
85531ac
fix: remove ioutil
ldez Oct 11, 2022
538112e
chore: CI and linter
ldez Oct 11, 2022
9e0fe46
chore: fix install script
ldez Oct 11, 2022
ace5ced
chore: fix install script
ldez Oct 11, 2022
6890413
chore: clean make and scripts
ldez Oct 12, 2022
0813272
chore: review tests
ldez Oct 12, 2022
e477db5
chore: update actions/cache to v3
ldez Oct 21, 2022
126f34e
chore: update Go, and linter
ldez Jun 18, 2023
e42515a
fix: inArray is case-insensitive
ldez Jun 18, 2023
5b63375
doc: update readme
ldez Jun 19, 2023
c5297e1
doc: fix typos (#2)
alexandear Jun 19, 2023
349f09b
chore: update Go, linter, and clean
ldez Aug 21, 2023
b320085
docs: fix typo in README (#7)
alexandear Oct 12, 2023
9304602
chore: update linter
ldez Dec 20, 2023
885fec0
docs: fix documentation about source/mode
ldez Dec 20, 2023
39b4324
docs: fix documentation about source/mode
ldez Dec 20, 2023
8aceb42
dev: fix govet, nestif lint issues (#6)
alexandear Feb 19, 2024
2cc38ac
chore: update Go, linter, and clean
ldez Feb 19, 2024
201b6e6
chore: linting
ldez Feb 19, 2024
fd7b9c1
dev: fix data race in TestCheckReplace (#5)
alexandear Mar 2, 2024
4a5584d
fix: panic with csv and SQLite format
ldez Apr 18, 2024
c58ee5c
chore: update linter
ldez Apr 18, 2024
d73f40e
docs: typo typos
ldez Apr 18, 2024
913a8c3
feat: add option for user defined dictionary
ldez Apr 18, 2024
79edc0f
chore: format comments
ldez Apr 18, 2024
b5ecf9a
chore: refactor main function
ldez Apr 18, 2024
f33d7fd
fix: improve host name detection
ldez Apr 19, 2024
8e11bca
fix: install script and release assets
ldez Jun 7, 2024
475533d
chore: remove windows from post release step
ldez Jun 7, 2024
528d713
feat: add pre-commit hook config (#19)
VannTen Jun 7, 2024
5575515
fix: installation script with curl 8.8.0
ldez Jun 12, 2024
7082d00
fix: CI
ldez Jun 12, 2024
d8e3a6c
chore: update linter
ldez Jan 26, 2025
9801fd6
chore: minor fixes to install-misspell.sh and typo in readme (#26)
jessp01 Jan 26, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 55 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Checks

on:
push:
branches:
- master
pull_request:

jobs:

check-code:
name: Check code
runs-on: ubuntu-latest
env:
GO_VERSION: stable
GOLANGCI_LINT_VERSION: v1.63.4
CGO_ENABLED: 0

steps:

# https://github.com/marketplace/actions/checkout
- name: Check out code
uses: actions/checkout@v4

# https://github.com/marketplace/actions/setup-go-environment
- name: Set up Go ${{ env.GO_VERSION }}
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}

- name: Check and get dependencies
run: |
go mod tidy
git diff --exit-code go.mod
git diff --exit-code go.sum

# https://golangci-lint.run/usage/install#other-ci
- name: Install golangci-lint ${{ env.GOLANGCI_LINT_VERSION }}
run: |
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin ${GOLANGCI_LINT_VERSION}
golangci-lint --version

- name: Make
run: make

check-local-install-script:
name: Installation script (local)
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Check installation script
run: cat ./install-misspell.sh | sh -s -- -d -b "./install-misspell"
31 changes: 31 additions & 0 deletions .github/workflows/go-cross.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Compilation
on:
push:
branches:
- master
pull_request:

jobs:

cross:
name: Go
runs-on: ${{ matrix.os }}
env:
CGO_ENABLED: 0

strategy:
matrix:
go-version: [ stable, oldstable ]
os: [ubuntu-latest, macos-latest, windows-latest]

steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}

- name: Test
run: go test -v -cover ./...

- name: Build
run: go build -v -ldflags "-s -w" -trimpath
16 changes: 16 additions & 0 deletions .github/workflows/post-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: "Post release"
on:
release:
types:
- published

jobs:
check-install-script:
name: Installation script (remote)
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}

steps:
- run: curl -sSfL https://raw.githubusercontent.com/golangci/misspell/master/install-misspell.sh | sh -s -- -b "./install-misspell"
30 changes: 30 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: "Release a tag"
on:
push:
tags:
- v*

jobs:
release:
name: Release Process
runs-on: ubuntu-latest
env:
GO_VERSION: stable
CGO_ENABLED: 0

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}

# https://goreleaser.com/ci/actions/
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN_REPO }}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ dist/
bin/
vendor/

.idea/
/misspell

# editor turds
*~
*.gz
Expand Down
96 changes: 96 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
linters:
enable-all: true
disable:
- exportloopref # deprecated
- rowserrcheck # not relevant (SQL)
- sqlclosecheck # not relevant (SQL)
- cyclop # duplicate of gocyclo
- dupl
- exhaustive
- exhaustruct
- forbidigo
- gochecknoglobals
- gochecknoinits
- err113
- mnd
- lll
- nilnil
- nlreturn
- paralleltest
- prealloc
- testpackage
- tparallel
- varnamelen
- wrapcheck
- wsl
- misspell
- gosec # FIXME(ldez) must be fixed
- errcheck # FIXME(ldez) must be fixed
- nonamedreturns # FIXME(ldez) must be fixed
- nakedret # FIXME(ldez) must be fixed

linters-settings:
govet:
enable-all: true
disable:
- fieldalignment
gocyclo:
min-complexity: 16
goconst:
min-len: 3
min-occurrences: 3
misspell:
locale: US
funlen:
lines: -1
statements: 40
gofumpt:
extra-rules: true
depguard:
rules:
main:
deny:
- pkg: "github.com/instana/testify"
desc: not allowed
- pkg: "github.com/pkg/errors"
desc: Should be replaced by standard lib errors package
godox:
keywords:
- FIXME
gocritic:
enabled-tags:
- diagnostic
- style
- performance
disabled-checks:
- sloppyReassign
- rangeValCopy
- octalLiteral
- paramTypeCombine # already handle by gofumpt.extra-rules
- exitAfterDefer # FIXME(ldez) must be fixed
- ifElseChain # FIXME(ldez) must be fixed
settings:
hugeParam:
sizeThreshold: 100
forbidigo:
forbid:
- '^print(ln)?$'
- '^panic$'
- '^spew\.Print(f|ln)?$'
- '^spew\.Dump$'

issues:
exclude-use-default: false
max-issues-per-linter: 0
max-same-issues: 0
exclude:
- 'ST1000: at least one file in a package should have a package comment'
- 'package-comments: should have a package comment'
exclude-rules:
- path: .*_test.go
linters:
- funlen
- goconst

run:
timeout: 2m
8 changes: 8 additions & 0 deletions .pre-commit-hooks.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
- id: misspell
name: misspell
description: Correct commonly misspelled English words... quickly
language: golang
entry: misspell
args:
- -w
- -error
20 changes: 0 additions & 20 deletions .travis.yml

This file was deleted.

8 changes: 3 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
FROM golang:1.10.0-alpine
FROM golang:1.22-alpine

# cache buster
RUN echo 4
RUN echo 4

# git is needed for "go get" below
RUN apk add --no-cache git make

# these are my standard testing / linting tools
RUN /bin/true \
&& go get -u github.com/golang/dep/cmd/dep \
&& go get -u github.com/alecthomas/gometalinter \
&& gometalinter --install \
&& rm -rf /go/src /go/pkg
#
# * SCOWL word list
Expand All @@ -35,3 +32,4 @@ RUN /bin/true \
&& wget -O /scowl-wl/words-US-60.txt ${SOURCE_US} \
&& wget -O /scowl-wl/words-GB-ise-60.txt ${SOURCE_GB_ISE}

RUN git config --global --add safe.directory "/go/src/github.com/golangci/misspell"
24 changes: 0 additions & 24 deletions Gopkg.lock

This file was deleted.

34 changes: 0 additions & 34 deletions Gopkg.toml

This file was deleted.

1 change: 0 additions & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,3 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

Loading