{"id":13906440,"url":"https://github.com/packsaddle/ruby-saddler","last_synced_at":"2025-09-03T17:47:40.809Z","repository":{"id":27366425,"uuid":"30841896","full_name":"packsaddle/ruby-saddler","owner":"packsaddle","description":null,"archived":false,"fork":false,"pushed_at":"2022-03-05T11:37:44.000Z","size":69,"stargazers_count":95,"open_issues_count":10,"forks_count":6,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-03-30T14:11:10.355Z","etag":null,"topics":["bot","code-review","github","lint","productivity","pull-request"],"latest_commit_sha":null,"homepage":"http://packsaddle.org","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/packsaddle.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-02-15T21:00:04.000Z","updated_at":"2024-05-24T07:33:31.000Z","dependencies_parsed_at":"2022-08-20T16:10:40.677Z","dependency_job_id":null,"html_url":"https://github.com/packsaddle/ruby-saddler","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/packsaddle%2Fruby-saddler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/packsaddle%2Fruby-saddler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/packsaddle%2Fruby-saddler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/packsaddle%2Fruby-saddler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/packsaddle","download_url":"https://codeload.github.com/packsaddle/ruby-saddler/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247509224,"owners_count":20950232,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bot","code-review","github","lint","productivity","pull-request"],"created_at":"2024-08-06T23:01:35.794Z","updated_at":"2025-04-06T16:12:01.033Z","avatar_url":"https://github.com/packsaddle.png","language":"Shell","funding_links":[],"categories":["Shell"],"sub_categories":[],"readme":"# Saddler\n\n[![Gem Version](http://img.shields.io/gem/v/saddler.svg?style=flat)](http://badge.fury.io/rb/saddler)\n[![Build Status](https://img.shields.io/circleci/build/github/packsaddle/ruby-saddler?style=flat)](https://circleci.com/gh/packsaddle/ruby-saddler)\n\nTo effectively use your lint messages!\n\n**checkstyle2anywhere**, you can integrate any lint, security checker and tools with anywhere (e.g. GitHub Pull Request Review Comment.)\n\n\n### Pull Request Review Comment\n\n![Pull Request Review Comment](https://cloud.githubusercontent.com/assets/75448/6392012/842ba6e2-bdff-11e4-84c3-bc180ac199bc.png \"Pull Request Review Comment\")\n\n\n### Pull Request Comment\n\n![Pull Request Comment](https://cloud.githubusercontent.com/assets/75448/6392013/892d1e5a-bdff-11e4-8ffb-f8ca93507662.png \"Pull Request Comment\")\n\n\n## Usage\n\n```\ngit diff -z --name-only origin/master \\\n | xargs -0 rubocop-select \\\n | xargs rubocop \\\n     --require rubocop/formatter/checkstyle_formatter \\\n     --format RuboCop::Formatter::CheckstyleFormatter \\\n | checkstyle_filter-git diff origin/master \\\n | saddler report \\\n    --require saddler/reporter/github \\\n    --reporter Saddler::Reporter::Github::PullRequestReviewComment\n```\n\nIt works!\n\nYou can run this from any CI Service (e.g. circle-ci, travis-ci, jenkins, etc).\n\n\n## Reporters\n\n* [saddler-reporter-text](https://github.com/packsaddle/ruby-saddler-reporter-text)\n* [saddler-reporter-github](https://github.com/packsaddle/ruby-saddler-reporter-github)\n\n\n## Requirement\n\nSet `GITHUB_ACCESS_TOKEN=__your_access_token__` to your environment variable.\n\n\n### TravisCI\n\n[Travis CI: Encryption keys](http://docs.travis-ci.com/user/encryption-keys/)\n\n```bash\n$ gem install travis\n$ travis encrypt -r \u003cowner_name\u003e/\u003crepos_name\u003e \"GITHUB_ACCESS_TOKEN=\u003cgithub_token\u003e\"\n```\n\n\n### CircleCI\n\n[Environment variables - CircleCI](https://circleci.com/docs/environment-variables)\n\n\n## Demo\nYou can send pull request to repos below. Try this!\n\n* TravisCI\n    * [Pull Request Review Comment (RuboCop)](https://github.com/packsaddle/example-travis_ci-pull_request_review)\n    * [Pull Request Comment (RuboCop)](https://github.com/packsaddle/example-travis_ci-pull_request)\n    * [Pull Request Review Comment (JSCS)](https://github.com/packsaddle/example-travis_ci-pull_request_review-jscs)\n* CircleCI\n    * [Pull Request Review Comment (RuboCop)](https://github.com/packsaddle/example-circle_ci-pull_request_review)\n    * [Pull Request Comment (RuboCop)](https://github.com/packsaddle/example-circle_ci-pull_request)\n    * [Pull Request Review Comment (JSCS)](https://github.com/packsaddle/example-circle_ci-pull_request_review-jscs)\n\n\n## Examples\n\n* textlint\n    * [jser/jser.github.io/test/travis-spellcheck.sh](./example/travis-spellcheck.sh) ([link](https://github.com/jser/jser.github.io/blob/6df31731656e0ebf04f84b92e5ae3d98096214b7/test/travis-spellcheck.sh))\n* RuboCop\n    * [packsaddle/ruby-saddler/bin/run-rubocop.sh](./example/run-rubocop.sh) ([link](https://github.com/packsaddle/ruby-saddler/blob/f0abab9d0c43a0a062c1f062000680a49ddb27a2/bin/run-rubocop.sh))\n* JSCS\n    * [run-jscs.sh](./example/run-jscs.sh)\n* Use multiple reporters simultaneously\n    * [Saddler::Reporter::Text and Saddler::Reporter::Github::PullRequestReviewComment](./example/run-simultaneously.sh)\n* Gradle android - Checkstyle, FindBugs, PMD, CPD, Android Lint\n    * [noboru-i/android-saddler-sample/scripts/saddler.sh](./example/run-gradle-android.sh) ([link](https://github.com/noboru-i/android-saddler-sample/blob/626fc93c6693144bd069db563836a856f401864a/scripts/saddler.sh))\n\n\n## Articles\n\n### ja\n\n* [jser/jser.github.ioの記事をpull request時にLintする仕組み | Web Scratch](http://efcl.info/2015/03/04/linting-article/)\n* [変更したファイルにrubocopやjscsを実行して pull requestに自動でコメントする – Saddler - checkstyle to anywhere](http://packsaddle.org/articles/saddler-overview/)\n* [CircleCI - Androidのコードを自動で解析し、GitHubのpull requestにコメントする - Qiita](http://qiita.com/noboru_i/items/2f30296db1c8a6dfbd9b)\n* [pull requestした差分にrubocopの結果を自動でコメントしてCircleCIをfailedにするよ - Qiita](http://qiita.com/nifuramu/items/e7490e86b7b67d99ac87)\n\n### vi\n* [Saddler – công cụ giúp CI chạy rubocop và comment lỗi trực tiếp vào pull request. – Appconus Blog](http://blog.appconus.com/2015/11/19/saddler-cong-cu-giup-ci-chay-rubocop-va-comment-loi-truc-tiep-vao-pull-request/)\n\n## VS.\n\n### [Hound (web service)](https://houndci.com/)\n\nEasy to configure, only allow GitHub oAuth.\nVery quick response,\nbecause Hound uses not entire code base but pull request hook's payload.\nBut Hound focuses on RuboCop and JavaScript linters wrapped by Rubygems.\nJavaScript libraries wrapped by Rubygems have code smells.\n\n\n### [Hound (oss)](https://github.com/thoughtbot/hound)\n\nYou can host *own* Hound.\nIf you like caring hosted rails application.\n\n\n### [Pronto](https://github.com/mmozuras/pronto)\n\nPronto is good application, and pronto influences saddler.\nPronto's command seems simple, but this is \"tightly-coupled\" command.\nPronto requires pronto-SOME-WRAPPER, and you should maintain wrapper scripts.\nAlmost all of linters have their own command line interface.\nWhy don't you use that direct?\n\n\n## FAQ\n\nQ: Is there the way to share in the command line?\n\nA: I think that sharing the command line is not a simple solution.\n\nWe can call `saddler report` multiple times.\nIf we want to run Saddler only once, we can create \"merged checkstyle file\" before calling `saddler report`.\n\n```\nmerge-checkstyle (command-a ...) (command-b ...) \\\n| saddler report ...\n```\n\nThis requires `merge-checkstyle` command, I'm not sure that this command exists. I search \"checkstyle\" in rubygems, but I don't find such gem.\n\n\nQ: Does Saddler support using both the text and Github reporters simultaneously?\n\nA: Use `tee`. See [Saddler::Reporter::Text and Saddler::Reporter::Github::PullRequestReviewComment](./example/run-simultaneously.sh).\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'saddler'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install saddler\n\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run `bin/console` for an interactive prompt that will allow you to experiment. Run `bundle exec saddler` to use the code located in this directory, ignoring other installed copies of this gem.\n\nTo install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release` to create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).\n\n\n## Contributing\n\n1. Fork it ( https://github.com/packsaddle/ruby-saddler/fork )\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create a new Pull Request\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpacksaddle%2Fruby-saddler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpacksaddle%2Fruby-saddler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpacksaddle%2Fruby-saddler/lists"}