Awesome
textlint-reviewdog-example
textlint + reviewdog example project
reviewdog can write textlint's lint result as GitHub review comments.
See also:
How to setup?
1. Setup .travis.yml
sudo: false
language: node_js
node_js: "stable"
env:
- REVIEWDOG_VERSION=0.9.5
install:
- mkdir -p ~/bin/ && export export PATH="~/bin/:$PATH"
- curl -fSL https://github.com/haya14busa/reviewdog/releases/download/$REVIEWDOG_VERSION/reviewdog_linux_amd64 -o ~/bin/reviewdog && chmod +x ~/bin/reviewdog
- npm install
script:
- $(npm bin)/textlint README.md
after_failure:
- test "$TRAVIS_PULL_REQUEST" && $(npm bin)/textlint -f checkstyle README.md | reviewdog -f=checkstyle -name="textlint" -ci="travis"
See .travis.yml for details.
2. Add REVIEWDOG_GITHUB_API_TOKEN
to Travis CI Config
Get your personal access token.
Set the access token to REVIEWDOG_GITHUB_API_TOKEN
.
travis env set REVIEWDOG_GITHUB_API_TOKEN <YOUR_TOKEN>
You can check the result:
$ travis env list
# environment variables for azu/textlint-reviewdog-example
REVIEWDOG_GITHUB_API_TOKEN=[secure]
3. Submit PR
See Example Pull Request.
Running tests
Install devDependencies and Run npm test
:
npm i -d && npm test
Contributing
Pull requests and stars are always welcome.
For bugs and feature requests, please create an issue.
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D
Author
License
MIT © azu