You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mahout.apache.org by Sean Owen <sr...@gmail.com> on 2010/06/03 14:30:56 UTC

Re: What's the main Checkstyle / FindBugs config?

Prompted by Shannon's (?) last question, I realize there is a third
location for these config files in the project: etc/.

The message I got from this thread was that it's possible to delete
eclipse/ (and by extension etc/?) but that maybe it could be unified.

What happens if I delete eclipse/ and etc/?

Yeah I know that's aggressive but I also point out that there is yet a
fourth set of configuration here: Eclipse-specific versions of
checkstyle configs, which are also present.

And there's a fifth set: my IntelliJ code inspection settings, which I
haven't checked in, but could. But then what about other IDE settings?
it keeps going...


Is it too aggressive to say we officially build and check-style with
Maven, checkstyle, findbugs (with configs in buildtools/), and
everything else is up to the user? I don't even know how many Eclipse
users there are out there versus IntelliJ and Other.


Tally up whatever we lose by deleting this versus the fact that right
now, to edit project-wide standards, I edit the same files in two
places (and had actually missed a set!) and am still failing to update
Eclipse-related settings since I don't use them. That strikes me as
bad.


On Thu, May 27, 2010 at 3:38 PM, Benson Margulies <bi...@gmail.com> wrote:
> I'm sure that it can be configured to all run out of the buildtools, but I'm
> not an expert on the reporting config site.
>
> On Thu, May 27, 2010 at 10:07 AM, Sean Owen <sr...@gmail.com> wrote:
>
>> Any or all sounds good, I'm mostly wondering whether there's a way
>> around having two sets of these files.
>>
>> I love static analysis and style-checking. Warning automatically on
>> violations is cool. Blocking commits sounds nice but in practice,
>> these things turn up a few false positives that cause problems. So,
>> y'know, I could live with just reports, so the interested can work on
>> fixing up code when motivated.
>>
>> On Thu, May 27, 2010 at 3:01 PM, Benson Margulies <bi...@gmail.com>
>> wrote:
>> > Buildtools exists to support a classpath-based scheme for managing these
>> > configs. It has some advantages as written up in the CXF-derived
>> description
>> > that I originally circulated, partially related to using the same configs
>> in
>> > maven and inside eclipse. If we are heading for 'checkstyle is a report,
>> not
>> > something we enforce,' then perhaps the eclipse configs are not that
>> > important, and ..-ing our way to these from an etc dir is fine. This
>> might
>> > in turn allow removing buildtools altogether. What do people want out of
>> > this? Do they want to preserve the enforcement option?
>> >
>> > On Thu, May 27, 2010 at 9:51 AM, Robin Anil <ro...@gmail.com>
>> wrote:
>> >
>> >> I am also not sure about the build tools. But to answer the other
>> >> question about the config xml files. Check the pom.xml in trunk. In
>> >> the reporting section you will find the paths to all the xmls. They
>> >> are the ones used to generate the reports and thus on hudson
>> >>
>> >> Robin
>> >>
>> >>
>> >>
>> >> On Thu, May 27, 2010 at 6:47 PM, Sean Owen <sr...@gmail.com> wrote:
>> >> > The ones under buildtools/ are just identical to the ones under maven/
>> >> > though, what do you mean? (They're a subset of the files, actually.)
>> >> >
>> >> > Actually what is buildtools/ used for now, I'm not seeing what it does
>> >> anymore.
>> >> >
>> >> > On Thu, May 27, 2010 at 2:10 PM, Robin Anil <ro...@gmail.com>
>> >> wrote:
>> >> >> I havent pointed all of them at maven. See the reporting section of
>> the
>> >> pom file
>> >> >>
>> >> >
>> >>
>> >
>>
>

Re: What's the main Checkstyle / FindBugs config?

Posted by Ted Dunning <te...@gmail.com>.
I think that the "maven is the official arbiter" is correct, but I would
find it very handy if we could share things like the IntelliJ code style
profiles even if they aren't authoritative.  My Mahout profile is definitely
not quite correct.  I am happy to refer to the Hudson builds as the
definitive version, but would love to have a head-start on my IDE configs.

On Thu, Jun 3, 2010 at 5:30 AM, Sean Owen <sr...@gmail.com> wrote:

> And there's a fifth set: my IntelliJ code inspection settings, which I
> haven't checked in, but could. But then what about other IDE settings?
> it keeps going...
>
>
> Is it too aggressive to say we officially build and check-style with
> Maven, checkstyle, findbugs (with configs in buildtools/), and
> everything else is up to the user? I don't even know how many Eclipse
> users there are out there versus IntelliJ and Other.
>
>
> Tally up whatever we lose by deleting this versus the fact that right
> now, to edit project-wide standards, I edit the same files in two
> places (and had actually missed a set!) and am still failing to update
> Eclipse-related settings since I don't use them. That strikes me as
> bad.
>

Re: What's the main Checkstyle / FindBugs config?

Posted by Sean Owen <sr...@gmail.com>.
I see that now.

So can we go the other way and remove the duplicates in other
directories? Surely one of buildtools/ or maven/ can go and be rolled
into one?

It just seems like we have at least 4 kinda-build-tool-ish modules and
I'm not clear how they differ enough to be separate:

(root)
buildtools/
maven/
eclipse/

And then yes etc/ can go?

On Fri, Jun 4, 2010 at 1:22 AM, Drew Farris <dr...@gmail.com> wrote:
> The files in eclipse/src/main/resources are referenced by the
> maven-eclipse-plugin configuration in the pom.xml file at the top level.
> They are referred to in the additionalConfig section via the classpath.
>
> The only thing that's in that directory now that happens to be a duplicate
> of an item elsewhere in the project is mahout-pmd-ruleset.xml.  We can get
> rid of that and add the buildtools artifact as a dependency to the maven
> eclipse plugin.
>
> The file eclipse/setup-eclipse-workspace.xml refers to
> etc/mahout-checkstyle.xml (which doesn't exist) .. this should be changed to
> reference the checkstyle configuration in buildtools as well. I wonder,
> could probably rid ourselves of the etc directory entirely?
>

Re: What's the main Checkstyle / FindBugs config?

Posted by Drew Farris <dr...@gmail.com>.
On Thu, Jun 3, 2010 at 5:40 PM, Sean Owen <sr...@gmail.com> wrote:

>
> For the moment, let me suggest a non-controversial change: I could not
> find any reference at all to files in the following directories, and,
> at least, Maven works fine without them. It does seem like every
> reference is to the other copy.
>
> etc/
> eclipse/src/main/resources/
>

The files in eclipse/src/main/resources are referenced by the
maven-eclipse-plugin configuration in the pom.xml file at the top level.
They are referred to in the additionalConfig section via the classpath.

The only thing that's in that directory now that happens to be a duplicate
of an item elsewhere in the project is mahout-pmd-ruleset.xml.  We can get
rid of that and add the buildtools artifact as a dependency to the maven
eclipse plugin.

The file eclipse/setup-eclipse-workspace.xml refers to
etc/mahout-checkstyle.xml (which doesn't exist) .. this should be changed to
reference the checkstyle configuration in buildtools as well. I wonder,
could probably rid ourselves of the etc directory entirely?

Re: What's the main Checkstyle / FindBugs config?

Posted by Sean Owen <sr...@gmail.com>.
I like PMD.

I'm neutral on sharing IDE configs, because it'll inevitably mean
inconsistent settings so seems futile. (Our settings already are.) So
I personally am not motivated to check in IntelliJ configs.

For the moment, let me suggest a non-controversial change: I could not
find any reference at all to files in the following directories, and,
at least, Maven works fine without them. It does seem like every
reference is to the other copy.

etc/
eclipse/src/main/resources/

Re: What's the main Checkstyle / FindBugs config?

Posted by Ted Dunning <te...@gmail.com>.
The only thing that IntelliJ doesn't set up from the Maven files are the
indentation and code-inspection profiles.

So that side of the house is 80% done.  If the indentation profile were
handy, that would be 95% because exact matching of code-inspection isn't
such a big problem.

On Thu, Jun 3, 2010 at 5:53 AM, Drew Farris <dr...@gmail.com> wrote:

> > Is it too aggressive to say we officially build and check-style with
> > Maven, checkstyle, findbugs (with configs in buildtools/), and
> > everything else is up to the user? I don't even know how many Eclipse
> > users there are out there versus IntelliJ and Other.
> >
>
> +1 for a single location for all of these files (buildtools), but it would
> be really great if we could get automated setup of Eclipse (and IntelliJ)
> working correctly.
>

Re: What's the main Checkstyle / FindBugs config?

Posted by Drew Farris <dr...@gmail.com>.
On Thu, Jun 3, 2010 at 8:30 AM, Sean Owen <sr...@gmail.com> wrote:

>
>
> Is it too aggressive to say we officially build and check-style with
> Maven, checkstyle, findbugs (with configs in buildtools/), and
> everything else is up to the user? I don't even know how many Eclipse
> users there are out there versus IntelliJ and Other.
>

+1 for a single location for all of these files (buildtools), but it would
be really great if we could get automated setup of Eclipse (and IntelliJ)
working correctly.

How do you all feel about pmd?

Drew