Enrico, I want the same thing. We encourage all contributors to use NetBeans to reformat code using the default settings before making a pull request and I would love to be able to point these contributors to a single Checkstyle file that confirms to the out of the box NetBeans formatting defaults.
John, are you saying that one of those four files (avalon_checks.xml, maven_checks.xml, sun_checks.xml, or turbine_checks.xml) is the file I should try? Do you or anyone else know which one matches the NetBeans formatting defaults? In the absence of having a Checkstyle file that implements the default NetBeans formatting rules, in our project (Dataverse) we have started constructing a Checkstyle file in which we try to mimic Netbeans but right now we only have two rules (spaces instead of tabs and curly brace placement). Please see http://guides.dataverse.org/en/4.10/developers/coding-style.html#checking-your-formatting-with-checkstyle for our write up and https://github.com/IQSS/dataverse/blob/v4.10/checkstyle.xml for our file that has only the two checks above. I would love to be able to replace our file with only the two checks with the "real" Checkstyle file that implements all the out of the box NetBeans formatting rules. Thanks, Phil On Tue, Jan 8, 2019 at 3:24 AM Enrico Olivelli <eolive...@gmail.com> wrote: > Il giorno mar 8 gen 2019 alle ore 09:09 John McDonnell > <mcdonnell.j...@gmail.com> ha scritto: > > > > Are you using a maven project? > > > > I think OOTB the maven checkstyle support uses one of the 3 'checks' > files in here: > https://github.com/apache/incubator-netbeans/tree/master/java/maven.checkstyle/src/org/netbeans/modules/maven/format/checkstyle/config > > > > After adding the plugin to the pom.xml file. > > > This is true, and that integration is great, > but my main problem is that I have many (Maven based) projects in > which I would like to enable checkstyle, > and they are all formatted with default NetBeans formatter, > it is hard to have a checkstyle configuration which is okay with them > > > Enrico > > > > > > Regards > > > > John > > > > On Tue, 8 Jan 2019 at 07:31, Enrico Olivelli <eolive...@gmail.com> > wrote: > >> > >> > >> > >> Il lun 7 gen 2019, 18:07 marccollin7...@gmail.com < > marccollin7...@gmail.com> ha scritto: > >>> > >>> Have you tried to download checkstyle plugin? > >>> you can choose a configuration file > >>> https://www.sickboy.cz/checkstyle/screenshots.html > >> > >> > >> That's cool but my primary need is to make code formatted automatically > by netbeans compliant with a checkstyle rules sheet. > >> > >> In most all of my projects I have always used netbeans with default > configuration so I am looking for a checkstyle configuration file which > covers that configuration. > >> > >> I don't need hints on the UI. > >> There is a minimal integration for checkstyle Maven plugin but it is > not covering many aspects > >> > >> So instead of making code formatted by netbeans compliant with my > rules..let's create the rules which suit netbeans way of working > >> > >> Enrico > >> > >>> > >>> > >>> On 2019/01/07 12:26:47, Enrico Olivelli <eolive...@gmail.com> wrote: > >>> > Hi, > >>> > is there any way to create a checkstyle configuration file given the > >>> > current NetBeans configuration for automatic reformat of Java code ? > >>> > > >>> > I would like to have a default checkstyle configuration file which > >>> > works out-of-the box with the out-of-the-box configuration of > >>> > NetBeans. > >>> > > >>> > PS. NetBeans 10 works like a charm, thank you ! > >>> > > >>> > Cheers > >>> > Enrico > >>> > > >>> > --------------------------------------------------------------------- > >>> > To unsubscribe, e-mail: users-unsubscr...@netbeans.apache.org > >>> > For additional commands, e-mail: users-h...@netbeans.apache.org > >>> > > >>> > For further information about the NetBeans mailing lists, visit: > >>> > https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists > >>> > > >>> > > >>> > >>> --------------------------------------------------------------------- > >>> To unsubscribe, e-mail: users-unsubscr...@netbeans.apache.org > >>> For additional commands, e-mail: users-h...@netbeans.apache.org > >>> > >>> For further information about the NetBeans mailing lists, visit: > >>> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists > >>> > >> -- > >> > >> > >> -- Enrico Olivelli > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@netbeans.apache.org > For additional commands, e-mail: users-h...@netbeans.apache.org > > For further information about the NetBeans mailing lists, visit: > https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists > >