Hi,
One of my question triggered a lengthy discussion on the IRC.
Please see the log below.
Here is a summary.
1) PMD is valuable to identify potential bugs and violations are
required to be fixed before committing the code into SVN.
2) The Eclipse formatter doesn't format code in the same style as
the checkstyle requires and some of the rules from checkstyle are a
bit too restrictive.
I voluneered to create a template for Eclipse formatter so that it
will produce reasonably formatted code that won't hit your top-5
hate list. The goal is to make sure both Eclipse and IDE format the
code in a consistent way which is close to the checkstyle rules. We
understand some of them (such as idententations) cannot be achieved
by Eclipse and these rules should be relaxed. The template for IDEA
will be adjusted accordingly once the best efforts have been done
for the Eclipse one.
Thanks,
Raymond
(1:02:55 PM) rfeng: dkulp?
(1:08:42 PM) dkulp: Hey
(1:12:47 PM) rfeng: I was wondering if you know any template for
eclipse to support checkstyle formatting
(1:14:27 PM) dkulp: To use the autoformat stuff?
(1:15:02 PM) dkulp: CXF has a bunch of things in https://
svn.apache.org/repos/asf/incubator/cxf/trunk/etc/eclipse
(1:17:12 PM) dkulp: You might want to try doing a checkout of CXF
trunk and running "mvn -Psetup.eclipse" and seeing what that does.
(1:17:53 PM) dkulp: It creates a "../workspace" directory that is
fully setup for CXF including import orders, codestyles, code
templates (apache license at top), warning levels, etc...
(1:23:46 PM) dkulp: Also note: all the "projects" in cxf have
".checkstyle", ".pmd", and ".ruleset" files checked in so the PMD
and Checkstyle eclipse plugins just work checking all the code as
you type in eclipse.
(1:26:33 PM) rfeng: ok
(1:28:33 PM) rfeng: sounds promising
(1:28:38 PM) rfeng: let me give a try
(1:28:44 PM) ant_: sounds really good
(1:30:58 PM) dkulp: One other note: the -Psetup.eclipse profile
automatically adds the "pmdNature" and "CheckStyleNatures" to
the .project files that are created.
(1:31:13 PM) dkulp: That has a downside of REQUIRING all the
developers to have Checksytle and PMD plugins installed.
(1:31:14 PM) ant_: and there's an idea folder...does that match
exactly what the eclipse one does?
(1:31:29 PM) dkulp: It setups up the codestyle rules and such.
(1:31:37 PM) rfeng: that's ok for me
(1:31:42 PM) dkulp: However, the PMD and Checkstyle plugins for
IDEA suck badly
(1:31:58 PM) dkulp: They are "on demand" in that you need to
specifically say "check this file"
(1:32:08 PM) dkulp: It's not a "whenever you save the file" type
thing.
(1:32:26 PM) rfeng: :-)
(1:35:12 PM) rfeng: I assume it's for CeltiXfire, can we setup the
samething for Eclipse?
(1:35:18 PM) rfeng: for Tuscany
(1:36:35 PM) dkulp: I would take a bit of work, but yes. (and I'm
sure Jeremy will complain about putting editor specific junk in the
poms)
(1:37:27 PM) jboynes: not if people don't complain when it breask
(1:37:29 PM) jboynes: breaks
(1:38:19 PM) rfeng: we can do the same thing, checking out the
source, run mvn -Psetup.eclipse
(1:38:34 PM) rfeng: if you use eclipse
(1:38:42 PM) jboynes: what if you don't?
(1:39:21 PM) rfeng: then you have to deal with checkstyle or PMD in
your own way :-)
(1:39:25 PM) cr22rc: can we have something that formats the once a
week and checks it in and we cease with checkstyle policing
(1:40:10 PM) rajith_home [EMAIL PROTECTED]
CM000039018663.cpe.net.cable.rogers.com] entered the room.
(1:40:47 PM) jboynes: cr22rc: thanks for volunteering
(1:41:03 PM) cr22rc: I knew that was coming
(1:41:28 PM) dkulp: Ask, and ye shall receive the action item....
(1:41:57 PM) rfeng: I guess only some of the checkstyle violations
can be handled by the formatter
(1:42:36 PM) dkulp: True. Checkstyle can check a bunch of other
"bad coding practices" things. (50 parameters on a method, 5000
line methods, etc...)
(1:42:59 PM) rfeng: Dan, can I directly import your eclipse
template (from the etc/eclipse)?
(1:43:24 PM) rfeng: the automation of .checkstyle and .pmd could be
a 2nd step
(1:43:46 PM) dkulp: You should be able to, yes.
(1:44:30 PM) cr22rc: sorry I may be behind .. but I have the etc/
eclipse template loaded in... is that inadequate ?
(1:45:32 PM) dkulp: The cxf stuff has a "few" things the tuscany
ones don't.
(1:45:54 PM) dkulp: One thing is it sets the template up for "new"
files to include the Apache license header
(1:46:36 PM) rfeng: I did that with Eclipse comments
(1:46:46 PM) dkulp: (which BTW: the cxf checkstyle also enforces)
(1:47:03 PM) rfeng: when I new class, I check the box "generate
comments"
(1:48:46 PM) rfeng: Dan, what's the org.eclipse.jdt.core.prefs for?
(1:49:20 PM) dkulp: The setup.eclipse profiles sets that into the
workspace to setup some warning levels.
(1:49:32 PM) rfeng: It seems to be overlapping with
CXFCodeFormatter.xml
(1:50:06 PM) dkulp: Oh, right. That file.
(1:50:39 PM) dkulp: If you "manually" import the
CXFCodeFormatter.xml into eclipse, it will generate the
org.eclipse.jdt.core.prefs file
(1:50:51 PM) dkulp: We want to "fully create a workspace with no
manual steps"
(1:51:03 PM) dkulp: Thus, we need that overlap to avoid having the
user import it.
(1:51:57 PM) rfeng: ok
(1:53:22 PM) dkulp: BTW: (reading the note on list) I NEVER use the
"autoformatt an entire file" thing in eclipse. Thus, I don't know
if it will format to checkstyle rules.
(1:53:44 PM) rfeng: :-(
(1:53:46 PM) dkulp: It's probably close, but I'm not sure about the
arrays initializers and such.
(1:54:13 PM) rfeng: that's one of things I have been struggling
(1:55:06 PM) ant_: me too. i do't really care about all the
checkstyle etc stuff. i just want the autoformat to macth whatever
the idea folks want
(1:56:01 PM) dkulp: I don't really know. I haven't heard any issues
from the CXF developers that ALL use eclipse. (or emacs, no IDEA
people that I know of)
(1:56:23 PM) dkulp: I suppose it's possible none of them use the
autoformat thing. I don't really know.
(1:56:41 PM) ant_: no idea users !
(1:58:21 PM) rfeng: Should we relax some of the rules which are
really just a style of formatting (I assume it won't impact the
quality of the code)?
(1:58:33 PM) cr22rc: +1
(1:58:41 PM) ant_: ++1
(1:58:59 PM) rfeng: I don't have problems reading either Eclipse or
IDEA formatted code
(2:00:39 PM) rfeng: let me try to run checkstyle against one of the
files formatted with the CXF template
(2:01:28 PM) rfeng: PMD seems to be more helpful
(2:01:41 PM) rfeng: to identify potential problems
(2:01:54 PM) dkulp: PMD is MUCH slower though.
(2:02:49 PM) rfeng: I can tolerate it if it produces some
meaningful results
(2:03:57 PM) rfeng: and I saw the value in my experience even I
disagree with a few rules such as "Don't assign the return value to
a variable before return"
(2:07:30 PM) rfeng: how do we reach a conclusion here? Should we
bring it up on the mailing list?
(2:08:01 PM) jmarino: one thing is I don't think code should be
checked in that completely violates formatting rules
(2:08:01 PM) ant_: yes,
(2:08:19 PM) jmarino: it makes things a mess and difficult for
people to follow
(2:09:26 PM) rfeng: are reasonably formatted code acceptable (for
example, from CXFFormatter, which may not be 100% the same as
checkstyle or IDEA)?
(2:09:36 PM) jmarino: minor things are no big deal but people
should take the time before checking in to make sure the guidelines
are followed...that's why they were set up in the first place
(2:11:00 PM) jmarino: I don't know what that means, e.g. what is
different? If it is not that much, I would be o.k. with it but we
need to look at the specifics
(2:11:29 PM) rfeng: I got the template following Dan's pointer
(2:11:42 PM) rfeng: they use it for Cletixire
(2:11:49 PM) jmarino: yes, so how does it differ from what we have
now?
(2:12:27 PM) jmarino: btw PMD violations almost always should never
be checked in. They generally indicate problematic code.
(2:12:30 PM) rfeng: for example, indentations for array initializers
(2:12:46 PM) ant_: so one thing is right now our pmd/checstyle/idea/
eclipse formatters don't match
(2:12:51 PM) jmarino: that one would be fine.
(2:12:53 PM) rfeng: I agree with the PMD part except for one or two
ruls
(2:12:56 PM) rfeng: rules
(2:13:14 PM) jmarino: I haven't had any collisions
(2:13:23 PM) jmarino: maybe the Eclipse plugin isn't working?
(2:13:48 PM) ant_: it works, its just different:)
(2:13:50 PM) rfeng: The plugin works well except it formats the
code slightly differently
(2:14:05 PM) jmarino: so it's the plugin?
(2:14:08 PM) ant_: maybe the others don't work :)
(2:14:19 PM) jmarino: IDEA works fine for me ;-)
(2:14:34 PM) rfeng: maybe IDEA is more adaptive
(2:14:45 PM) ant_: not if the eclispe one is doing it right
(2:15:07 PM) jmarino: I think the problem is more fundamental,
though. People are doing checkins without running from the command
line and without even bothering to format the most basic things
(2:16:10 PM) jmarino: For example, besides PMD issues, basic
control flow indentations and curly brackets...
(2:16:55 PM) rfeng: I guess if we have a less aggressive rules
without compromising the quality, more people are willing to follow
(2:17:18 PM) rfeng: no doubt about PMD parts
(2:18:00 PM) jmarino: I'd like to know what "less aggressive"
entails exactly. Checkstyle can be a bit fascistic but code is
being checked in that has absolutely crap formatting
(2:18:47 PM) dkulp: Make checkstyle profile the "default" for "mvn"
(2:18:49 PM) jmarino: Sorry for the vitriol but I spent better part
of a weekend fixing this in core
(2:19:00 PM) rfeng: I see this as a reasonable format produced by
an eclipse or idea template
(2:19:34 PM) jboynes: dkulp: it's too slow (you know, for those of
us who regularly build from the command line)
(2:19:39 PM) rfeng: We can try to make these two similar, but maybe
not 100%
(2:19:42 PM) dkulp: Add a "-Pnochecks" (or similar) profile to turn
off the checkstyle stuff
(2:20:18 PM) dkulp: (cxf does that) Provides a way for developers
to be "fast" but the default is "safe"
(2:20:35 PM) ***jboynes mutters to himself about bigbank codegen
adding 37s to the build
(2:21:08 PM) dkulp: BTW: how long does the C++ version take to build?
(2:21:36 PM) jboynes: no idea
(2:21:39 PM) rfeng: I agree with Dan, making sourcecheck default if
we can agree on a reasonable criteria for the formatting
(2:22:44 PM) rfeng: As said before, PMD can help identify potential
bugs and we should enforce it (one or two rules can be adjusted)
(2:24:10 PM) jboynes: I'd actually be in favour of relaxing the
checks IF people were more disciplined about reasonable formatting
(2:25:07 PM) dkulp: That's a big "if"
(2:25:41 PM) jboynes: yes
(2:25:56 PM) jboynes: jmarino's experience shows that we aren't
(2:26:27 PM) rfeng: I just tried to run one class with the
CXFormatter, checkstyle still complains about a lot of indentation
warnings
(2:27:18 PM) rfeng: that's one of the things I prefer to relax
(2:28:22 PM) rfeng: otherwise I have to use IDEA as a formatter to
fix the violations :-)
(2:28:41 PM) jboynes: ?
(2:29:39 PM) rfeng: so far I only know IDEA formatter can produce a
format that passes checkstyle
(2:30:00 PM) rfeng: or we have to manually do so
(2:30:08 PM) jboynes: I thought Eclipse could do anything?
(2:30:08 PM) dkulp: The checkstyle Indentation rule is not very
configurable. :-(
(2:30:11 PM) ***jboynes ducks
(2:30:58 PM) jboynes: I tweaked the idea config to match what's in
the checkstyle definition - can't you do the same with eclipse?
(2:30:59 PM) jmarino: maybe I'm crazy but when you guys code, don't
you always just do proper indentation?
(2:31:02 PM) rfeng: Eclipse formatter can be customized to fit
certain rules, but not all of them
(2:31:35 PM) rfeng: We do, but maybe not the same as the checkstyle
requires
(2:31:45 PM) rfeng: for example, 16 instead of 12
(2:31:48 PM) dkulp: There's also a couple bugs. (like it tends to
ignore the line length limit in a couple specific places)
(2:32:01 PM) rfeng: right
(2:32:03 PM) jmarino: I just do the idents
(2:32:37 PM) rfeng: maybe I should show this:
(2:32:39 PM) rfeng: private static final char[] S_BASE64CHAR =
{'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K',
(2:32:39 PM) rfeng: 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T',
'U', 'V',
(2:32:39 PM) rfeng: 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e',
'f', 'g',
(2:32:39 PM) rfeng: 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p',
'q', 'r',
(2:32:39 PM) rfeng: 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '0',
'1', '2',
(2:32:39 PM) rfeng: '3', '4', '5', '6', '7', '8', '9', '+', '/'};
(2:33:11 PM) rfeng: we can have many different styles for this format
(2:33:56 PM) rfeng: sorry, in CXF, 'L' aligns with 'A'
(2:34:06 PM) rfeng: is it reasonable?
(2:35:07 PM) cr22rc: is cxf the eclipse template or is this
something different?
(2:35:26 PM) rfeng: CXF eclipse formatter
(2:35:36 PM) rfeng: a template, I shoud say
(2:35:47 PM) jboynes: I'd prefer http://rafb.net/paste/results/
wJOh4964.html
(2:36:27 PM) rfeng: so that's where religious belief plays :-)
(2:37:06 PM) cr22rc: I don't know for me I can adjust dynamically
to either.
(2:37:07 PM) jboynes: no, that would be "you should prefer http://
rafb.net/paste/results/wJOh4964.html you heathen"
(2:37:13 PM) jboynes: :)
(2:37:18 PM) rfeng: http://rafb.net/paste/results/B6NZBs85.html
(2:37:29 PM) rfeng: here's the one from the CXF template
(2:37:57 PM) rfeng: I'm OK with both styles
(2:38:18 PM) rfeng: if the formatter can do it for me
(2:39:32 PM) rfeng: remember we also had a switch/case vote?
(2:39:35 PM) jboynes: http://rafb.net/paste/results/fS0FuZ39.html
(2:39:55 PM) rfeng: most of the responses said either one is fine
(2:40:30 PM) jboynes: IMO I would prefer to give developers discretion
(2:40:44 PM) rfeng: jboynes, why '+', '-' get wrapped?
(2:40:52 PM) jmarino: I don't like the colors ;-)
(2:41:01 PM) jboynes: e.g. I hate when Eclipse wraps at "first
whitespace before right margin"
(2:41:05 PM) jboynes: :p
(2:41:21 PM) jboynes: semantic - upper, lower, numeric, other
(2:41:28 PM) dkulp: rfeng: I can get eclipse to autoformat to:
http://rafb.net/paste/results/c9rWrI72.html
(2:41:49 PM) dkulp: That passes checkstyle. They closing brace is
the only "ugly" thing.
(2:41:52 PM) jboynes: I'd really put A-Z on one line put it has too
many characters
(2:41:58 PM) jboynes: :)
(2:42:12 PM) jboynes: dkulp: bech
(2:42:14 PM) jboynes: blech
(2:42:16 PM) ant_: i'm with jbones giving developers some descretion
(2:42:25 PM) jboynes: why break at 'T' ?
(2:42:44 PM) rfeng: yes, we can try to be consistent
(2:43:09 PM) dkulp: The "T" is at the 110 character limit I
currently have set.
(2:43:33 PM) jboynes: that's what I hate
(2:43:50 PM) jboynes: from a user's perspective that seems wierd
(2:44:03 PM) rfeng: can I know why :-)?
(2:44:09 PM) rfeng: you said it
(2:44:41 PM) jboynes: the alphabet is A-Z
(2:44:50 PM) jboynes: not A-T, U-n
(2:45:07 PM) rfeng: the formatter cannot be so smart :-)
(2:45:17 PM) jboynes: humans are :)
(2:45:20 PM) cr22rc: did anyone say there was a plugin eclipse/
ideal for the PMD checks? anything in the works?
(2:45:29 PM) jboynes: need a better formatter
(2:45:32 PM) rfeng: yes, I'm using it
(2:45:40 PM) dkulp: Eclipse has a very good PMD plugin
(2:45:42 PM) rfeng: PMD
(2:45:53 PM) lresende: hi, who would be someone that could give me
a help with axis InterfaceWriter ?
(2:46:08 PM) rfeng: sounds good, it could be improved to do quick-fix
(2:46:43 PM) rfeng: right click on the violation, and say quick-fix
(2:47:12 PM) cr22rc: http://eclipse-plugins.2y.net/eclipse/
plugin_details.jsp?id=111
(2:47:13 PM) rfeng: another thing it always run check against the
whole project even you only select one file
(2:47:32 PM) rfeng: that's the one
(2:48:00 PM) cr22rc: maybe I'll run it then once in a while :-)
(2:48:09 PM) rfeng: ok, we spent a lot of time here, can we have a
consensus now?
(2:48:21 PM) rfeng: 1) PMD is mandatory
(2:49:08 PM) jboynes: rfeng: another example of something I don't
like is http://rafb.net/paste/results/MqlZpb19.html
(2:49:25 PM) rfeng: 2) checkstyle could be relaxed for certain
formatting rules (Dan, is it possible to change the rules file?)?
(2:49:53 PM) jboynes: I'd write http://rafb.net/paste/results/
buLEIG74.html
(2:49:58 PM) rfeng: jboynes, so you prefer not to align the parameters
(2:50:02 PM) ant_: i don't even know what PMD does. if you want it
to be manditory could you post details to the mailing list
(2:50:13 PM) ant_: (please)
(2:50:59 PM) rfeng: jboynes, eclipse can format in your way :-)
(2:51:04 PM) jboynes: which way?
(2:51:09 PM) rfeng: 2nd way
(2:51:22 PM) rfeng: either way, I should say
(2:51:32 PM) jboynes: can you tell people how to do that then
please, it seems to prefer the first
(2:52:07 PM) jboynes: what I want is "all on one line until it
doesn't fit, then one per line"
(2:52:26 PM) jboynes: but not "as much as you can get on each line"
(2:52:28 PM) rfeng: I can try to further customize the template
from CXF so that the top-5 hate list from everybody can be fixed :-)
(2:52:39 PM) jboynes: yeah!
(2:52:47 PM) jboynes: can you do the same for idea (please) :)
(2:52:55 PM) rfeng: no idea :-)
(2:53:07 PM) jboynes: welcome to my world
(2:54:08 PM) rfeng: anybody wants to give a pointer to ant for PMD?
(2:54:31 PM) jboynes: google it
(2:54:43 PM) jboynes: comes up as the first link
(2:54:49 PM) rfeng: to me it's lint-like tool
(2:54:51 PM) rfeng: http://sourceforge.net/projects/pmd/
(2:55:00 PM) dkulp: Select "Wrap all elements, except first element
if not necessary"
(2:55:06 PM) rfeng: yes
(2:55:43 PM) dkulp: This is a good discussion. It's making me
really look at the eclipse formatter
(2:55:54 PM) rfeng: what's the policy now for the checkstyle?
(2:55:56 PM) dkulp: I need to update the CXF codestyles.
(2:59:46 PM) ant_: jboynes, if you want to make something manditory
for th eproject you need to post details to the mailing list not
just decide on IRC and tell people to google it for details. That
attitude is whats make this whole formatting debate keep going on
for so many months
(3:00:15 PM) jboynes: ant_: you wanted a pointer, its the easiest way
(3:00:41 PM) jmarino: I thought we did explain what it does in
numerous emails. Ant, do you really not understand what it is?
(3:00:50 PM) ant_: i'm fine with it not being manditory ;)
(3:01:18 PM) jboynes: ant_: please don't make other people do your
research for you
(3:01:41 PM) jmarino: maybe this would help: http://
pmd.sourceforge.net/rules/index.html
(3:02:38 PM) jmarino: I think it contains a nice summary f the
various rules
(3:02:51 PM) rfeng: I tried it, then I started to understand what
it can do for me
(3:03:14 PM) dkulp: OK. Found a place that eclipse formatter
doesn't work at all: annotations. It won't wrap long annotations at
all. At least I cannot figure out how.
(3:03:30 PM) rfeng: right, I had the same issue
(3:03:56 PM) rfeng: it wraps after @Autowire for parameters
(3:04:03 PM) jmarino: PMD also has a parse bug with annotations
(3:04:19 PM) jmarino: can't handle annotations with attribute arrays
(3:04:23 PM) rfeng: PMD also has a bug for private field references
(3:04:40 PM) jmarino: those I think we work around or do //no pmd
when possible
(3:04:47 PM) dkulp: With PMD 3.7 or 3.6?
(3:04:51 PM) rfeng: it complains it's not referenced
(3:04:57 PM) ant_: you're really selling it to me :)
(3:05:08 PM) jmarino: for the annotations, I beleive 3.6 maybe it
was fixed as it was logged as a JIRA
(3:05:26 PM) jmarino: I think it's already been sold...we agreed to
use it a while back
(3:06:10 PM) jmarino: like any other piece of software, there are
trade-offs but the benefits it provided are far more
(3:07:52 PM) cr22rc: is the pmd checks with the eclipse plugin the
same that would be reported with the maven plugin reports?
(3:08:16 PM) dkulp: Providing you configure the project with the
right ruleset, yes.
(3:08:58 PM) cr22rc: so it does look for the rules in the main
project directory
(3:09:20 PM) jmarino: got to run ciao
(3:11:43 PM) rfeng: I hate to ask again, what's the final agreement?
(3:12:02 PM) jmarino left the room (quit: Remote closed the
connection).
(3:12:49 PM) ant_: there isn't one, and it needs to be on the
mailing list. Having just read the old emails threads there never
has been much agreement on this
(3:14:06 PM) rfeng: should we have vote :-)?
(3:14:54 PM) rfeng: 1) Enforce PMD 2) Relax checkstyle but require
a reasonable formatting
(3:15:13 PM) ant_: thats devisive but your choice. it would help if
there was concrete files we could all test out in our environmenst
first
(3:16:02 PM) rfeng: meaning a sample java code?
(3:16:02 PM) rfeng: ?
(3:16:28 PM) ant_: i was thinking the eclpse fortamter templates etc
(3:16:44 PM) ant_: eclipse formatter...
(3:17:39 PM) rfeng: ok, I can try to update the one in SVN
(3:17:45 PM) jboynes: don't forget idea
(3:18:04 PM) rfeng: who will volunteer for the idea one?
(3:19:06 PM) rfeng: jboynes, I had an impression that idea formats
well, right?
(3:19:29 PM) jboynes: doesn't seem to break much
(3:19:37 PM) dkulp left the room (quit: "using sirc version 2.211
+KSIRC/1.3.12").
(3:19:57 PM) jboynes: but if you start refomatting things then it
might
(3:20:56 PM) jboynes: atm what it does does not break checkstyle
(3:21:11 PM) jboynes: if you're not changing the checkstyle rules
then we may be ok
(3:21:29 PM) jboynes: but if you do then we'd want to change ideas
rules to match
(3:22:06 PM) rfeng: I'm not sure about checkstyle customizations,
Dan said it's not possible the change the identations
(3:22:13 PM) jboynes: at the start of the project we formatted the
code with eclipse and idea and got not diffs
(3:22:18 PM) jboynes: so the two were in sync
(3:22:49 PM) jboynes: and I think we set checkstyle to match that
(3:23:25 PM) rfeng: but I was using the template from SVN and got a
lot of checkstyle complaints
(3:23:41 PM) jboynes: I guess we didn't then
(3:23:41 PM) rfeng: I mean the eclipse template
(3:23:47 PM) ant_: me too
(3:24:30 PM) jboynes: so we need to change something
(3:24:56 PM) jboynes: it comes down to who's on top: checkstyle,
idea or eclispe
(3:25:10 PM) jboynes: checkstyle and idea seem to be in sync
(3:25:28 PM) jboynes: so we either change eclipse, or checkstyle
and idea
(3:25:44 PM) jboynes: pick your poison :)
(3:26:15 PM) jboynes: I don't really mind so long as the result is
not ugly (by my religion's defn of ugly)
(3:26:17 PM) rfeng: that's why we had a hard time with eclipse :-)
and it's not straightforward to customize the eclipse template
(3:26:45 PM) jboynes: hence the change checkstyle and idea option
(3:27:25 PM) jboynes: pick you poison :)
(3:28:01 PM) rfeng: I prefer to keep eclipse and idea as close as
we can and make the checkstyle audit nice to have
(3:29:13 PM) jboynes: it seems like others have other opinions
(3:29:32 PM) ant_: i agrea with rfeng on that
(3:30:50 PM) jboynes: it seems like others have other opinions
(3:31:03 PM) ant_: but, we all need to make some compromises. this
debate has been going on since march
(3:31:26 PM) rfeng: jboynes, what's the other opinions?
(3:31:34 PM) jboynes: that checkstyle rules
(3:31:40 PM) rfeng: checkstyle is mandatory?
(3:32:50 PM) ant_: if checkstyle can be made to match the eclipse
formatter (or, the eclipse formatter made to match check style) and
the same for idea then that may be easier to accept
(3:33:03 PM) jboynes: putting words in jmarino's mouth, that all
code should pass the checkstyle audit before being committed
(3:33:16 PM) jboynes: at least, that's what I think his opinion is
(3:33:33 PM) rfeng: that's the part I feel a bit too restrictive
(3:33:55 PM) jboynes: I know, I don't necessary agree with him but
I think that's his positin
(3:34:08 PM) jboynes: dkulp wanted to do the audit on every mvn
(3:34:22 PM) jboynes: with a -Pnochecks option to turn it off
(3:34:34 PM) ant_: earlier on this evening he wasn't quite so
strong... not completely violates...minor things are ok
(3:34:39 PM) rfeng: that seems to be safe to me, if it's madantory
(3:35:14 PM) rfeng: let me bring the proposal to the mailing list
and see if we agree
(3:35:28 PM) jboynes: I'm confused - it's too restrictive, but safe
if its mandatory?
(3:36:13 PM) rfeng: I meant if we should agree the audit is
mandatory, then default, mvn should run with it
(3:36:21 PM) rfeng: by default
(3:36:29 PM) jboynes: ah, ok
(3:36:38 PM) jboynes: well you know my opinion on that
(3:37:14 PM) rfeng: yeah, let's respect others' as well :-)
(3:37:26 PM) ant_: i don't really agree with that either.
especially not if the eclipse formatter can't do it
(3:37:48 PM) jboynes: um, who's opinion here am I not respecting?
(3:38:12 PM) cr22rc: do we have any information on how slow the
whole build will be with it on ?
(3:38:13 PM) rfeng: no, no, I was just saying to make it on the
mailing list
(3:38:33 PM) rfeng: so that other folks can speak out for their own
(3:39:02 PM) jboynes: I must actually admit to being sick of the
whole debate
(3:39:39 PM) rfeng: any best way to reach consensus or compromise?
(3:39:43 PM) jboynes: and frustrated that it's all about eclipse
with little consideration of those of us not inflicted by it
(3:40:03 PM) ant_: intersting quote from back in march:
(3:40:05 PM) ant_: I just think we're focusing a little much on
layout and not enough on e.g. testing.
(3:40:09 PM) jboynes: we have consensus and compomise already
(3:41:03 PM) jboynes: and your point ant?
(3:41:22 PM) jboynes: we can reopen it, or we can do something like
code
(3:41:53 PM) ant_: reopen it?
(3:42:23 PM) jboynes: been much disucssion on this recently?
(3:43:17 PM) ant_: i'm lost, this what?
(3:43:41 PM) jboynes: the stuff have just spent the last couple of
hours talking about
(3:45:25 PM) jboynes: we've already lost dkulp and jmarino
(3:45:40 PM) cr22rc: IMO: if someone wants to *enforce* these
rules, let them step up to fixing both eclipse and idea ides so
they can be easily followed.
(3:47:07 PM) jboynes: why not just respect others in the community
by following the rules?
(3:47:45 PM) jboynes: enforcement is a bad thing
(3:48:01 PM) jboynes: well not really
(3:48:13 PM) cr22rc: like decisons should be done on the mailing
list and not IRC?
(3:48:18 PM) jboynes: needing to enforce things is a sign that
people don't really respect others
(3:48:35 PM) jboynes: sure
(3:48:50 PM) ant_: its not about respect or disrespect. I don't
know what the rules are. I agree with what cr22rc said, if people
wnat checkstyle they just need to help get all IDE's to work with it
(3:49:08 PM) jboynes: sure, to the extent they can
(3:49:36 PM) jboynes: we all help each other, right?
(3:50:24 PM) jboynes: it's like checking code in that does not compile
(3:51:01 PM) jboynes: nothing stops you, except respect for others
and an awareness of the chaos it causes them
(3:51:55 PM) rfeng: I'm wondering how other apache projects do in
these areas? I copied some code from other projects and it ended up
as the worst violators :-(
(3:52:05 PM) ant_: i think you're changing the argument a bit. as
you said idea/eclipse formatters worked together originally.
checkstyle has been added and now elclipse doesn't
(3:52:07 PM) jboynes: having multiple coding styles does not help
others either
(3:52:44 PM) jboynes: e.g. patches end up as a mixture of changes +
reformats
(3:53:16 PM) rfeng: I agree and that's why I keep saying make the
two formatters work as close as we can
(3:53:25 PM) ant_: i don't know of any other apache projects that
worry so much about this (except cxf), jboynes do you?
(3:53:30 PM) jboynes: maven does
(3:53:38 PM) jboynes: most seem to have rules
(3:53:56 PM) jboynes: or guidelines
(3:54:04 PM) ant_: guidlines I'd say, and not very strctly applied
(3:54:17 PM) jboynes: maybe not needed if people automatically
follow them
(3:54:29 PM) jboynes: that's the ideal - there's no enforcement
becuase we all do it
(3:54:40 PM) jboynes: as a project, we don't
(3:55:04 PM) rfeng: I feel guidelines and pre-defined templates for
Eclipse and Idea will help all of us willing to follow
(3:55:32 PM) jboynes: the willingness comes first, the tools can help
(3:55:35 PM) jboynes: so, are you willing?
(3:55:50 PM) rfeng: I think it's mutual
(3:56:14 PM) rfeng: I'm willing to, but sometimes tired of doing it
maunally :-)
(3:56:41 PM) jboynes: sure, me too
(3:56:45 PM) rfeng: so if the tool helps me out, I'm enjoying to do
so :-)
(3:56:59 PM) jboynes: sure
(3:57:11 PM) jboynes: but willing means that you think its
important and would do it anyway
(3:58:59 PM) cr22rc: I ran them for a while, and fixed issues but
the 100s style *warnings* after I did an eclipse format was too
much to deal with guess I'm just disrespectful
(4:00:00 PM) ant_: as i think has been said a few times now, if we
could get eclipse formatter and checkstyle to match the battle
would be half way over
(4:00:31 PM) rfeng: jboynes, agree, just a bit concerned that too
restrictive rules will hurt the productivity
(4:01:18 PM) jboynes: what about the productivity lost with
arbitrary reformats?
(4:01:38 PM) jboynes: that's the code must compile thing
(4:01:47 PM) jboynes: it hurts productivity
(4:02:01 PM) jboynes: but more importantly is makes things
difficult for others
(4:02:10 PM) jboynes: same with inconsistent styles
(4:02:27 PM) jboynes: they lead to more conflicts which hurts
productivity
(4:02:37 PM) jboynes: and increase frustration
(4:02:39 PM) jboynes: etc.
(4:02:44 PM) ant_: what makes things difficult for others?
(4:02:48 PM) rfeng: I'm never promote "arbitrary reformat", I
preferred to have the reasonably consistent style with some
tolerations of the diffs from two IDEs
(4:03:18 PM) jboynes: ant_: svn up leading to conflicts because
someone else's IDE reformatted the code
(4:03:27 PM) jboynes: that's one example
(4:03:42 PM) ant_: is that a big problem? I've not noticed it
(4:03:47 PM) jboynes: that's why most OSS projects say "make the
code match what's there"
(4:03:48 PM) rfeng: and for fixing code, we can do sectional format
(4:05:31 PM) jboynes: i think we all know the solution here: get
checkstyle, eclipse and idea in sync
(4:06:43 PM) cr22rc: <cr22rc> IMO: if someone wants to *enforce*
these rules, let them step up to fixing both eclipse and idea ides
so they can be easily followed.
(4:07:10 PM) cr22rc: isn't that pretty much what I said ?
(4:07:48 PM) ant_: i think rfeng earlier on volunteered to help
(4:07:49 PM) jboynes: sounds like you don't think these rules are
important
(4:07:57 PM) rfeng: cr22rc, I think jboynes has explained to you.
(4:08:56 PM) jboynes: cr22rc: I really would hope we don't need
enforcers
(4:09:25 PM) rfeng: I volunteered to create an eclipse template
which won't produce code that hits your top-5 hate-list, but not
for checkstyle compliance. I found difficult to achieve the later
(4:09:46 PM) jboynes: that's great
(4:09:56 PM) jboynes: and we can change checkstyle
(4:10:07 PM) jboynes: we just need to change idea at the same time
(4:10:21 PM) cr22rc: I' can pretty much adjust to any reasonable
style... my only rule I've ever cared about with regard to this is
that a style be consistent in a file.
(4:10:43 PM) rfeng: ok, sounds reasonable to me, I hope the eclipse
formatter will deviate much from IDEA
(4:11:00 PM) rfeng: will not
(4:11:05 PM) jboynes: I guessed :)
(4:11:20 PM) cr22rc: But I'm willing to live what the community
agrees to.
(4:11:34 PM) jboynes: so let's fix eclipse to get as close to
checkstyle
(4:11:52 PM) jboynes: and for the things that are hard, change
checkstyle and let people know
(4:11:58 PM) rfeng: ok
(4:11:59 PM) jboynes: so they can update idea/anything else
(4:12:15 PM) jboynes: like that vote I had on how to indent case
(4:13:43 PM) jboynes: that leaves the guideline though that code
should look the same
(4:14:01 PM) jboynes: and the defn of "what the same" is comes from
checkstyle (as that is common to all)
(4:14:58 PM) jboynes: as to enforcement, my opinion is that we
should never need to run the sourcecheck goal
(4:15:16 PM) jboynes: as when we write code we take care to comply
(4:15:41 PM) jboynes: tools help, but in the end responsibility
lies with the committer
(4:17:17 PM) bertlamb_ left the room (quit: Read error: 113 (No
route to host)).
(4:29:43 PM) jboynes: any thoughts?
(4:32:00 PM) cr22rc: I think we're thought out :-)
(4:32:28 PM) ant_: it would be great to get eclipse/idea/checkstyle
in sync. if we can do that i hope it will go a long way to
alleviate this sore point thants been arround for ages
(4:34:53 PM) cr22rc: I agree
(4:36:40 PM) jboynes: great; rfeng thanks for volunteering :)
(4:37:02 PM) jboynes: (seriously, thanks)
(4:37:49 PM) ant_: i'm off for the night, ttyl
(4:38:06 PM) ant_: (we should do this for all the other bones...)
(4:38:15 PM) ant_ is now known as ant_away
(4:38:19 PM) cr22rc: why it's tomorrow there ?
(4:38:21 PM) cr22rc: :-)
(4:39:08 PM) jboynes: I have to run as well - kid kollection
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]