Skip to content

Commit

Permalink
Add self-linting :)
Browse files Browse the repository at this point in the history
  • Loading branch information
vodkabears committed May 13, 2017
1 parent e414cd4 commit 9bd59de
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 13 deletions.
8 changes: 8 additions & 0 deletions .yaspellignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
^uk$
^ru$
^lang$
^dict$
^olang$
^(G|g)olang$
^(Y|y)aspell$
^to `yaspell$
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,12 @@ install: githooks
go get -u github.com/msoap/go-carpet
go get -u github.com/go-playground/overalls
go get -u github.com/mattn/goveralls
go get -u github.com/vodkabears/yaspell
go install ./...

.PHONY: lint
lint:
yaspell -opts=IGNORE_UPPERCASE,IGNORE_DIGITS,IGNORE_URLS -dict=.yaspellignore README.md
gometalinter ./... --enable-all --line-length=100 --vendor --sort=path --sort=line --sort=column --deadline=5m -t -j 1

.PHONY: test
Expand Down
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,28 +38,28 @@ Yandex.Speller options.

Example: `-opts=IGNORE_UPPERCASE,IGNORE_DIGITS`

`IGNORE_UPPERCASE` ignores uppercased words
`IGNORE_UPPERCASE` ignores uppercase words
`IGNORE_DIGITS` ignores words with digits
`IGNORE_URLS` ignores urls, emails, filenames
`IGNORE_URLS` ignores URLs, emails, filenames
`FIND_REPEAT_WORDS` highlights repetitions of words, consecutive
`IGNORE_LATIN` ignores latin words
`IGNORE_LATIN` ignores Latin words
`NO_SUGGEST` disables suggestions for incorrect words
`FLAG_LATIN` marks latin words as incorrect
`FLAG_LATIN` marks Latin words as incorrect
`BY_WORDS` ignores dictionary context
`IGNORE_CAPITALIZATION` ignores the incorrect use of UPPERCASE/lowercase letters
`IGNORE_ROMAN_NUMERALS` ignores roman numerals
`IGNORE_ROMAN_NUMERALS` ignores Roman numerals

#### -dict

Dictionary file with regexp patterns.
Dictionary file with regular expressions.

Example: `-dict=dict.txt`
Regexp syntax: https://golang.org/pkg/regexp/syntax/#hdr-Syntax
Syntax of regular expressions : https://golang.org/pkg/regexp/syntax/#hdr-Syntax

dict.txt content:
```
^nananana$
^(?i)gogogogo$
^lang$
^(G|g)olang$
```

#### -lang
Expand All @@ -82,7 +82,7 @@ Example: `-format=html`

Prints current version.

## Todo
## To-do

- Improve terminal interface.
- GUI.
Expand Down
6 changes: 3 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Flags:
Example: -opts=IGNORE_UPPERCASE,IGNORE_DIGITS
IGNORE_UPPERCASE ignores uppercased words
IGNORE_UPPERCASE ignores uppercase words
IGNORE_DIGITS ignores words with digits
IGNORE_URLS ignores urls, emails, filenames
FIND_REPEAT_WORDS highlights repetitions of words, consecutive
Expand All @@ -39,8 +39,8 @@ Flags:
Regexp syntax: https://golang.org/pkg/regexp/syntax/#hdr-Syntax
dict.txt content:
^nananana$
^(?i)gogogogo$
^lang$
^dict$
-lang
Language to check.
Expand Down

0 comments on commit 9bd59de

Please sign in to comment.