hbase-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Heng Chen <heng.chen.1...@gmail.com>
Subject Re: ruby checkstyle seems some unreasonable
Date Fri, 19 Feb 2016 02:52:47 GMT
Thanks for your reply,  busbey.

btw.  Do you know how to run rubocop locally, i want to test my ruby
locally firstly before upload to jira.

Thanks again.

2016-02-19 8:21 GMT+08:00 Sean Busbey <busbey@cloudera.com>:

> I agree we should provide rubocop with a project specific configuration
> file.
>
> On your specific grievances:
>
> 1) sure, the method was already in dire straights. I think this is a case
> for committer judgement rather than a rule change. A reasonable outcome
> could be giving a patch that raises such a concern a pass, but making sure
> we have a follow on issue to fix things.
>
> 2) the Ruby line length should match the rest of the project. I think
> that's 100?
>
> 3) the existing uses of double quotes should be corrected in time and we
> should avoid new uses.
>
> Much of our Ruby code was written by folks who don't do much Ruby coding.
> It would benefit us as a project to move towards making our Ruby code look
> more like the wider Ruby use.
>
> --
> Sean Busbey
> On Feb 18, 2016 17:04, "Heng Chen" <heng.chen.1986@gmail.com> wrote:
>
> > During HBASE-15128,  i made some changes to ruby script, it cause a lot
> of
> > warning about ruby style.
> >
> >
> >
> https://builds.apache.org/job/PreCommit-HBASE-Build/587/artifact/patchprocess/diff-patch-rubocop.txt
> >
> > A lot of warnings exist already,  i think it is unreasonable.
> >
> > for example:
> >
> > 1.  /testptch/hbase/hbase-shell/src/main/ruby/hbase/admin.rb:32:3: C:
> Class
> > has too many lines. [777/100]
> > The class length has exceeded 100 already.
> >
> > 2.  /testptch/hbase/hbase-shell/src/main/ruby/hbase/admin.rb:135:81: C:
> > Line is too long. [99/80]
> > I think length 100 is more reasonable.
> >
> >
> > 3. /testptch/hbase/hbase-shell/src/main/ruby/hbase/admin.rb:145:30: C:
> > Prefer single-quoted strings when you don't need string interpolation or
> > special symbols.
> > I see many strings in script use double-quoted.
> >
> > wdyt?
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message