Terrastories / terrastories

Terrastories is a geostorytelling application for mapping, managing and sharing place-based stories.
https://terrastories.app
MIT License
319 stars 157 forks source link

[Tests] Setup StandardRB for Ruby #313

Closed kalimar closed 2 years ago

kalimar commented 5 years ago

We are going to setup StandardRB as part of our development environment. This will involve some additional documentation so developers know how to integrate the tool into their text editors. https://github.com/testdouble/standard#how-do-i-run-standard-in-my-editor

Before merging this we should come to a basic agreement on configuration and local setup.

rgenchev commented 5 years ago

Can I work on this? Thanks in advance! :)

midhunkrishna commented 5 years ago

@kalimar @rgenchev,

I think the following plan of action should work:

  1. Install rubocop like, in development and test groups
gem "rubocop-github"
gem "rubocop-performance"
gem "rubocop-rails"
  1. Generate config by:
rubocop --auto-gen-config

This should create a .rubocop.yml file and .rubocop-todo.yml, which can be split into multiple tickets and worked on later without creating a single large PR (s ince this project is small and in the early stages, we can still go ahead and do an auto fix, wdyt @kalimar )

  1. I would say the default configuration provided would suffice?

  2. Editor specific setup instructions are provided in the rubocop documentation itself (https://rubocop.readthedocs.io/en/latest/integration_with_other_tools/#editor-integration). We can include this link to the readme.

midhunkrishna commented 5 years ago

Shouldn't we also have a section in here about the different tools that we use for dev?

Eg:

We Use:

@kalimar @MxOliver @mirandawang

rgenchev commented 5 years ago

I created https://github.com/Terrastories/terrastories/pull/340. I wasn't sure if I should update the readme.

midhunkrishna commented 5 years ago

@rgenchev I wasn't sure about the readme either. You can update readme like this in this PR -> https://github.com/Terrastories/terrastories/pull/338/files#diff-550856cf67eb7260aaeb883550043af8R143-R149

rgenchev commented 5 years ago

@midhunkrishna, I did it here: https://github.com/Terrastories/terrastories/pull/340/commits/2a2d32c3373f467e8a2679fff49cb2833d13dd9c

lauramosher commented 4 years ago

Thoughts on utilizing StandardRB? It is essentially a wrapper around RuboCop, but defines "standards" for which rules are enforced rather than having to determine which ones we want to and why for each cop.

rgenchev commented 4 years ago

I could continue working on this. We just have to decide whether we pick rubocop or StandardRB.

rgenchev commented 4 years ago

@lauramosher, @midhunkrishna, @kalimar, what do you think? :)

lauramosher commented 4 years ago

@rgenchev HI! Thank you for your interest. I've updated the issue to reflect the decision the stewards have landed on for our linter and formatter. Let us know if you have any questions.

I've assigned you this issue. If you've changed your mind, please let us know and we'll unassign you. Thanks!