{"repo":"jeromedalbert/rubocop-obsession","free":true,"listed":false,"github":"https://github.com/jeromedalbert/rubocop-obsession","clone":"git clone https://github.com/jeromedalbert/rubocop-obsession.git","description":"RuboCop extension focused on higher-level concepts, like checking that code reads from top to bottom","language":"Ruby","stars":140,"topics":["linter","rubocop","ruby","static-code-analysis","code-formatter"],"license":"MIT","category":"dev-tools","readme_excerpt":"Rubocop Obsession A RuboCop extension that focuses on higher-level concepts, like checking that code reads from top to bottom, or only unit testing public methods. There are some lower-level cops as well. Use the provided cops as is, or as inspiration to build custom cops aligned with your project's best practices. Installation Install the gem: Or add this line to your Gemfile: and run bundle install . Usage You need to tell Rubocop to load the Obsession extension. There are three ways to do this: Rubocop configuration file Put this into your .rubocop.yml . Alternatively, use the following array notation when specifying multiple extensions. Now you can run rubocop and it will automatically load the Rubocop Obsession cops together with the standard cops. [!NOTE] The plugin system is supported in RuboCop 1.72+. In earlier versions, use require instead of plugins . Command line Rake task The cops All cops are located under lib/rubocop/cop/obsession , and contain examples and documentation. Their default configuration is defined in config/default.yml . These cops are opinionated and can feel like too much, that is why some of them are disabled by default. Do not hesitate to enable or disable them as needed. I wrote them to scratch an itch I had at one point or another. Tastes change with time, and I personally do not use some of them any more, but others might find them useful. Development After checking out the repo, run bin/setup to install dependencies. Then, run rake spec to ","default_branch":null,"files":null,"tree":[],"storefront":"/r/jeromedalbert","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/jeromedalbert/rubocop-obsession/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}