GithubHelp home page GithubHelp logo

Comments (6)

advayDev1 avatar advayDev1 commented on July 21, 2024

Here's the standard Groovy style guide:
http://www.groovy-lang.org/style-guide.html

Since we are a 100% groovy project, I think we should stick as closely as we can to them. A mixed Java/Groovy style I think will be even more confusing.

from j2objc-gradle.

brunobowden avatar brunobowden commented on July 21, 2024

Looks good, we should follow this and then add extra stuff specific to Gradle. I'll work on that.

from j2objc-gradle.

advayDev1 avatar advayDev1 commented on July 21, 2024

Ah good point.

from j2objc-gradle.

advayDev1 avatar advayDev1 commented on July 21, 2024

Suggest we say that our style is Groovy style guide, and where it does not specify and does not conflict, back-off to Google Java style guide:
https://google-styleguide.googlecode.com/svn/trunk/javaguide.html

Also, we need to make a decision on top-level method calls in statements. We are very inconsistent between java.call(arg) style and groovy.call arg style.

from j2objc-gradle.

brunobowden avatar brunobowden commented on July 21, 2024

I personally prefer parentheses as I find it more familiar. It sounds like the Groovy Style Guide isn't clear on this but I suspect it would make it easier for other engineers contributing.

What's your thoughts on this @advayDev1?

from j2objc-gradle.

advayDev1 avatar advayDev1 commented on July 21, 2024

I'm torn. I'm huge on consistency so that style things become more mechanical and less subject to reviewer dispute. If we're going to split into parens and no-parnes, I'd suggest the following rules:

  1. If the statement is solely a DSL/property setting method (ex. 'translateArgs in j2objcConfig'), do not use parentheses on the top-level method.
  2. If the statement is a logging method of the form logger.LEVEL or log.LEVEL, do not use parentheses on the top-level method.
  3. Otherwise, always use parentheses.

Thoughts?

from j2objc-gradle.

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.