-
-
Notifications
You must be signed in to change notification settings - Fork 152
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3,031 changed files
with
1,881,319 additions
and
0 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
FROM alpine:3.7 | ||
|
||
# TODO: Install DITA-related deps | ||
# | ||
# See https://cloud.docker.com/repository/docker/jdkato/vale | ||
RUN apk add --no-cache --update \ | ||
python3 \ | ||
asciidoctor \ | ||
&& pip3 install docutils | ||
|
||
COPY bin/vale /bin | ||
# Compatibility | ||
COPY bin/vale / | ||
|
||
ENV PATH="/bin:${PATH}" | ||
ENTRYPOINT ["/bin/vale"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
source 'https://rubygems.org' | ||
|
||
gem 'specific_install', '~> 0.3.3' | ||
gem 'cucumber', '~> 2.3.0' | ||
gem 'os', '~> 0.9.6' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
GEM | ||
remote: https://rubygems.org/ | ||
specs: | ||
builder (3.2.3) | ||
cucumber (2.3.3) | ||
builder (>= 2.1.2) | ||
cucumber-core (~> 1.4.0) | ||
cucumber-wire (~> 0.0.1) | ||
diff-lcs (>= 1.1.3) | ||
gherkin (~> 3.2.0) | ||
multi_json (>= 1.7.5, < 2.0) | ||
multi_test (>= 0.1.2) | ||
cucumber-core (1.4.0) | ||
gherkin (~> 3.2.0) | ||
cucumber-wire (0.0.1) | ||
diff-lcs (1.3) | ||
gherkin (3.2.0) | ||
multi_json (1.12.1) | ||
multi_test (0.1.2) | ||
os (0.9.6) | ||
specific_install (0.3.3) | ||
|
||
PLATFORMS | ||
ruby | ||
|
||
DEPENDENCIES | ||
cucumber (~> 2.3.0) | ||
os (~> 0.9.6) | ||
specific_install (~> 0.3.3) | ||
|
||
BUNDLED WITH | ||
1.13.7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2016 - 2019 Joseph Kato | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
LAST_TAG=$(shell git describe --abbrev=0 --tags) | ||
CURR_SHA=$(shell git rev-parse --verify HEAD) | ||
|
||
LDFLAGS=-ldflags "-s -w -X main.version=$(LAST_TAG)" | ||
BUILD_DIR=./builds | ||
|
||
.PHONY: data test lint cross install bump rules setup bench compare release | ||
|
||
all: build | ||
|
||
# make release tag=v0.4.3 | ||
release: | ||
git tag $(tag) | ||
git push origin $(tag) | ||
|
||
build: | ||
go build ${LDFLAGS} -o bin/vale | ||
|
||
closed: | ||
go build -tags closed ${LDFLAGS} -o bin/vale | ||
|
||
build-win: | ||
go build ${LDFLAGS} -o vale.exe | ||
go-msi make --msi vale.msi --version $(LAST_TAG) | ||
|
||
install: | ||
go install ${LDFLAGS} | ||
|
||
spell: | ||
./bin/vale --glob='!*{Needless,Diacritical,DenizenLabels,AnimalLabels}.yml' rule styles | ||
|
||
bench: | ||
go test -bench=. -benchmem ./core ./lint ./check | ||
|
||
compare: | ||
cd lint && \ | ||
benchmany -n 5 -o new.txt ${CURR_SHA} && \ | ||
benchmany -n 5 -o old.txt ${LAST_TAG} && \ | ||
benchcmp old.txt new.txt && \ | ||
benchstat old.txt new.txt | ||
|
||
lint: | ||
gometalinter --vendor --disable-all \ | ||
--enable=deadcode \ | ||
--enable=ineffassign \ | ||
--enable=gosimple \ | ||
--enable=staticcheck \ | ||
--enable=goimports \ | ||
--enable=dupl \ | ||
--enable=misspell \ | ||
--enable=errcheck \ | ||
--enable=vet \ | ||
--enable=vetshadow \ | ||
--deadline=1m \ | ||
./core ./lint ./ui ./check | ||
|
||
setup: | ||
go get golang.org/x/perf/cmd/benchstat | ||
go get golang.org/x/tools/cmd/benchcmp | ||
go get github.com/aclements/go-misc/benchmany | ||
go get -u github.com/alecthomas/gometalinter | ||
go get -u github.com/jteeuwen/go-bindata/... | ||
bundle install | ||
gem specific_install -l https://github.com/jdkato/aruba.git -b d-win-fix | ||
|
||
rules: | ||
go-bindata -ignore=\\.DS_Store -pkg="rule" -o rule/rule.go rule/**/*.yml | ||
|
||
data: | ||
go-bindata -ignore=\\.DS_Store -pkg="data" -o data/data.go data/*.{dic,aff} | ||
|
||
spath: | ||
bash script/stylesPath.sh | ||
|
||
test: | ||
go test -race ./core ./lint ./check | ||
cucumber | ||
|
||
docker: | ||
GOOS=linux GOARCH=amd64 go build ${LDFLAGS} -o bin/vale | ||
docker login -u jdkato -p ${DOCKER_PASS} | ||
docker build -f Dockerfile -t jdkato/vale:latest . | ||
docker tag jdkato/vale:latest jdkato/vale:latest | ||
docker push jdkato/vale | ||
|
||
cross: | ||
mkdir -p $(BUILD_DIR) | ||
|
||
GOOS=linux GOARCH=amd64 go build ${LDFLAGS} | ||
tar -czvf "$(BUILD_DIR)/vale_$(LAST_TAG)_Linux_64-bit.tar.gz" ./vale | ||
|
||
rm -rf vale | ||
|
||
GOOS=darwin GOARCH=amd64 go build ${LDFLAGS} | ||
tar -czvf "$(BUILD_DIR)/vale_$(LAST_TAG)_macOS_64-bit.tar.gz" ./vale | ||
|
||
rm -rf vale | ||
|
||
GOOS=windows GOARCH=amd64 go build ${LDFLAGS} | ||
zip -r "$(BUILD_DIR)/vale_$(LAST_TAG)_Windows_64-bit.zip" ./vale.exe | ||
|
||
rm -rf vale.exe |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package action | ||
|
||
import ( | ||
"fmt" | ||
|
||
"github.com/errata-ai/vale/check" | ||
"github.com/errata-ai/vale/core" | ||
) | ||
|
||
// ListConfig prints Vale's active configuration. | ||
func ListConfig(config *core.Config) error { | ||
fmt.Println(core.DumpConfig(config)) | ||
return nil | ||
} | ||
|
||
// GetTemplate prints tamplate for the given extension point. | ||
func GetTemplate(name string) error { | ||
template := check.GetTemplate(name) | ||
if template != "" { | ||
fmt.Println(template) | ||
} else { | ||
fmt.Printf( | ||
"'%s' not in %v!\n", name, check.GetExtenionPoints()) | ||
} | ||
return nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
// +build !closed | ||
|
||
package action | ||
|
||
import ( | ||
"github.com/errata-ai/vale/core" | ||
) | ||
|
||
// GetLibrary returns the latest style library. | ||
func GetLibrary(config *core.Config) error { | ||
return nil | ||
} | ||
|
||
// StartAddons starts all installed add-ons. | ||
func StartAddons(config *core.Config) error { | ||
return nil | ||
} | ||
|
||
// StopAddons stops all installed add-ons. | ||
func StopAddons(config *core.Config, args []string) error { | ||
return nil | ||
} | ||
|
||
// FetchAddon an external (compressed) resource. | ||
func FetchAddon(config *core.Config, args []string) error { | ||
return nil | ||
} | ||
|
||
// GetAddons lists all available add-ons. | ||
func GetAddons(config *core.Config) error { | ||
return nil | ||
} | ||
|
||
// InstallStyle installs the given style using its download link. | ||
func InstallStyle(config *core.Config, args []string) error { | ||
return nil | ||
} | ||
|
||
// ListDir prints all folders on the current StylesPath. | ||
func ListDir(config *core.Config, path string) error { | ||
return nil | ||
} | ||
|
||
// AddProject adds a new project to the current StylesPath. | ||
func AddProject(cfg *core.Config, name string) error { | ||
return nil | ||
} | ||
|
||
// RemoveProject deletes a project from the current StylesPath. | ||
func RemoveProject(cfg *core.Config, name string) error { | ||
return nil | ||
} | ||
|
||
// EditProject renames a project from the current StylesPath. | ||
func EditProject(cfg *core.Config, args []string) error { | ||
return nil | ||
} | ||
|
||
// UpdateVocab updates a vocab file for the given project. | ||
func UpdateVocab(config *core.Config, args []string) error { | ||
return nil | ||
} | ||
|
||
// GetVocab extracts a vocab file for a project. | ||
func GetVocab(config *core.Config, args []string) error { | ||
return nil | ||
} |
Oops, something went wrong.