github.com/serversong/goreporter@v0.0.0-20200325104552-3cfaf44fd178/linters/spellcheck/misspell/Makefile (about)

     1  CONTAINER=nickg/misspell
     2  
     3  build:
     4  	cp precommit.sh .git/hooks/pre-commit
     5  	go install ./cmd/misspell
     6  	gometalinter \
     7  		 --vendor \
     8  		 --deadline=60s \
     9  	         --disable-all \
    10  		 --enable=vet \
    11  		 --enable=golint \
    12  		 --enable=gofmt \
    13  		 --enable=goimports \
    14  		 --enable=gosimple \
    15  		 --enable=staticcheck \
    16  		 --enable=ineffassign \
    17  		 ./...
    18  	go test .
    19  
    20  
    21  # the grep in line 2 is to remove misspellings in the spelling dictionary
    22  # that trigger false positives!!
    23  falsepositives: /scowl-wl
    24  	cat /scowl-wl/words-US-60.txt | \
    25  		grep -i -v -E "payed|Tyre|Euclidian|nonoccurence|dependancy|reenforced|accidently|surprize|dependance|idealogy|binominal|causalities|conquerer|withing|casette|analyse|analogue|dialogue|paralyse|catalogue|archaeolog|clarinettist|catalyses|cancell|chisell|ageing|cataloguing" | \
    26  		misspell -locale=US -debug -error
    27  	cat /scowl-wl/words-US-60.txt | tr '[:lower:]' '[:upper:]' | \
    28  		grep -i -v -E "payed|Tyre|Euclidian|nonoccurence|dependancy|reenforced|accidently|surprize|dependance|idealogy|binominal|causalities|conquerer|withing|casette|analyse|analogue|dialogue|paralyse|catalogue|archaeolog|clarinettist|catalyses|cancell|chisell|ageing|cataloguing" | \
    29  		 misspell -locale=US -debug -error
    30  	cat /scowl-wl/words-GB-ise-60.txt | \
    31  		grep -v -E "payed|nonoccurence|withing" | \
    32  		misspell -locale=UK -debug -error
    33  	cat /scowl-wl/words-GB-ise-60.txt | tr '[:lower:]' '[:upper:]' | \
    34  		grep -i -v -E "payed|nonoccurence|withing" | \
    35  		misspell -debug -error
    36  #	cat /scowl-wl/words-GB-ize-60.txt | \
    37  #		grep -v -E "withing" | \
    38  #		misspell -debug -error
    39  #	cat /scowl-wl/words-CA-60.txt | \
    40  #		grep -v -E "withing" | \
    41  #		misspell -debug -error
    42  
    43  bench:
    44  	go test -bench '.*'
    45  
    46  clean:
    47  	go clean ./...
    48  	git gc
    49  
    50  ci:
    51  	type dmnt >/dev/null 2>&1 || go get -u github.com/client9/dmnt
    52  	docker run --rm \
    53  		$(shell dmnt .) \
    54  		-w /go/src/github.com/client9/misspell \
    55  		${CONTAINER} \
    56  		make build falsepositives
    57  
    58  travis:
    59  	docker --version
    60  	docker run --rm \
    61  		-v ${PWD}:/go/src/github.com/client9/misspell \
    62  		-w /go/src/github.com/client9/misspell \
    63  		${CONTAINER} \
    64  		make build falsepositives
    65  
    66  docker-build:
    67  	docker build -t ${CONTAINER} .
    68  
    69  console:
    70  	docker run --rm -it \
    71  		$(shell dmnt .) \
    72  		-w /go/src/github.com/client9/misspell \
    73  		${CONTAINER} sh
    74  
    75  .PHONY: ci console docker-build bench