Giter Site home page Giter Site logo

Comments (10)

markijbema avatar markijbema commented on July 24, 2024

I think it would be the most appropriate. I'm a bit weary of suggesting people should only submit rubocop validated code; for instance, I think it's worthwhile to have a discussion about quoting style (I get nitpicked all the time about this; I actually use my own convention for this, which I think is worthwhile, and find interesting to discuss to see what others see). Or to give another example, this would conflict with the Weirich block style.

Maybe it would be better to suggest rubocop along with a exercism approved 'minimum' config? I'm sure everyone agrees we should indent 2, not 4 spaces.

from ruby.

kytrinyx avatar kytrinyx commented on July 24, 2024

Yeah, for Ruby I think that the value of linting is consistency within a team, and a discussion about why you prefer one way over the other. I don't think there should be any sort of style guide (aside from the aforementioned 2 spaces for indentation).

I've never used rubocop, so I don't know how easy it is to turn rules on and off.

from ruby.

markijbema avatar markijbema commented on July 24, 2024

You can configure this with a yaml file. You can also easily take an existing codebase (say the current examples), run rubocop on them, and automatically generate an ignore file for all rules which weren't followed.

from ruby.

kytrinyx avatar kytrinyx commented on July 24, 2024

I'm not sure I want to suggest a default set of styles per se, only suggest that people experiment with rubocop to see what it can do for them, and perhaps suggest some styles they might try (or point to a good blog post on the matter).

from ruby.

markijbema avatar markijbema commented on July 24, 2024

Ah yes, that would be a good idea. You can probably point them towards https://github.com/bbatsov/ruby-style-guide now, since it allows multiple interpretations of controversial issues. Then maybe add how they can generate a config they like with --autogen-config

from ruby.

kytrinyx avatar kytrinyx commented on July 24, 2024

Perfect.

from ruby.

kotp avatar kotp commented on July 24, 2024

As far as style goes, I think the sentiment you brought up elsewhere was "I want people to say 'Look at Exercism as a source of great style and clarity.'" (which is paraphrased, as I don't remember the exact quote), and so Rubocop as a tool for this to promote standards convention is a good thing. So for the tests, I think using Rubocop to enforce style is a good thing, with the freedom, of course, to ignore those 'cops' based on judgement for the authors. For those participating and learning, it is good to leave the discussion point open for style. (Even tabs vs spaces vs 2 spaces vs 4 or 6 || 8 spaces).

from ruby.

kytrinyx avatar kytrinyx commented on July 24, 2024

Agreed, the consistency would be useful here.

from ruby.

kotp avatar kotp commented on July 24, 2024

Also merged #60 so thinking this should be closed as an issue?

from ruby.

kytrinyx avatar kytrinyx commented on July 24, 2024

Thanks!

from ruby.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.