You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by Pinaki Poddar <pp...@apache.org> on 2009/06/04 18:38:16 UTC

80-column line width & auto-generated model classes

Hi,
  We are now checking in *.java files for canonical meta-model classes in
SVN. Source code for these classes are auto-generated and may exceed
80-column per line. Noticed some work on enforcing 80-column limit on test
source code -- can't locate the exact issue -- but anyway that work must
consider exception for these auto-generated source files.

-----
Pinaki Poddar                      http://ppoddar.blogspot.com/
                                      
http://www.linkedin.com/in/pinakipoddar
OpenJPA PMC Member/Committer
JPA Expert Group Member
-- 
View this message in context: http://n2.nabble.com/80-column-line-width---auto-generated-model-classes-tp3025746p3025746.html
Sent from the OpenJPA Developers mailing list archive at Nabble.com.


Re: 80-column line width & auto-generated model classes

Posted by Michael Dick <mi...@gmail.com>.
Hi all,

The main problem with using ant to generate the metamodel classes is that a
vanilla checkout from SVN will not compile until you run a maven build.
You'd probably see this is you checked out directly from your IDE of choice.


One can argue that we're already in that boat with the javacc classes in
openjpa-kernel, but there's no real good reason to compound the issue.

Bearing that in mind I don't think we need to apply the 80 column rule to
metamodel classes. If anyone else has a compelling reason why we should
apply the rule please respond here (and I'll pull out the change again).

-mike

On Fri, Jun 5, 2009 at 12:58 PM, Michael Dick <mi...@gmail.com>wrote:

> On Fri, Jun 5, 2009 at 11:58 AM, Donald Woods <dw...@apache.org> wrote:
>
>>
>>
>> Michael Dick wrote:
>>
>>> On Fri, Jun 5, 2009 at 10:17 AM, Pinaki Poddar <pp...@apache.org>
>>> wrote:
>>>
>>>  Hi Mike,
>>>>
>>>>> Are the files generated during the build process or are they committed
>>>>> to
>>>>> SVN?
>>>>>
>>>> They are committed to SVN. Other Junit Test code needs them at
>>>> development/compile time.
>>>>
>>>>
>>> Why can't we run the tool to generate the code during the build? Ideally
>>> after running checkstyle, but if we can't do that then we can always
>>> disable
>>> the check.
>>>
>>>
>> Agree.  Maybe by using the process-resource goal and antrun plugin?
>>
>> But, I could also see where we would want a handful of these checked in,
>>  as a test to compare what the mapping tool is creating versus what we
>> expect.
>>
>
> Good idea. In that case we'd want to exclude those files from checkstyle
> (might list them explicitly or keep the wildcard I put in this morning).
>
> Antrun + test-compile might be where we want to go (after checkstyle runs
> for test classes). Could be a little ticklish getting the order right, I
> don't think maven allows you to specify orders within a phase. Should be
> doable though.
>
> -mike
>
>
>>
>>
>>>  I think they should comply before we commit them.
>>>>>
>>>> They are generated by an automatic source code writer. The writer/code
>>>> generator does not  have a notion of line length limit during output. To
>>>> enforce it via that code generator is neither trivial for the way it
>>>> emits
>>>> different code elements nor I have bandwidth to invest. If compliance to
>>>> line length limit is paramount, then whichever issue (I still could not
>>>> find
>>>> that JIRA) is handling that task may take that up.
>>>>
>>>>
>>> I think that compliance to code conventions is paramount for anything we
>>> commit to SVN. What the line length is set to is debatable, but if it's
>>> committed then it should conform.
>>>
>>> <snip>
>>>
>>> -mike
>>>
>>>
>

Re: 80-column line width & auto-generated model classes

Posted by Michael Dick <mi...@gmail.com>.
On Fri, Jun 5, 2009 at 11:58 AM, Donald Woods <dw...@apache.org> wrote:

>
>
> Michael Dick wrote:
>
>> On Fri, Jun 5, 2009 at 10:17 AM, Pinaki Poddar <pp...@apache.org>
>> wrote:
>>
>>  Hi Mike,
>>>
>>>> Are the files generated during the build process or are they committed
>>>> to
>>>> SVN?
>>>>
>>> They are committed to SVN. Other Junit Test code needs them at
>>> development/compile time.
>>>
>>>
>> Why can't we run the tool to generate the code during the build? Ideally
>> after running checkstyle, but if we can't do that then we can always
>> disable
>> the check.
>>
>>
> Agree.  Maybe by using the process-resource goal and antrun plugin?
>
> But, I could also see where we would want a handful of these checked in,
>  as a test to compare what the mapping tool is creating versus what we
> expect.
>

Good idea. In that case we'd want to exclude those files from checkstyle
(might list them explicitly or keep the wildcard I put in this morning).

Antrun + test-compile might be where we want to go (after checkstyle runs
for test classes). Could be a little ticklish getting the order right, I
don't think maven allows you to specify orders within a phase. Should be
doable though.

-mike


>
>
>>  I think they should comply before we commit them.
>>>>
>>> They are generated by an automatic source code writer. The writer/code
>>> generator does not  have a notion of line length limit during output. To
>>> enforce it via that code generator is neither trivial for the way it
>>> emits
>>> different code elements nor I have bandwidth to invest. If compliance to
>>> line length limit is paramount, then whichever issue (I still could not
>>> find
>>> that JIRA) is handling that task may take that up.
>>>
>>>
>> I think that compliance to code conventions is paramount for anything we
>> commit to SVN. What the line length is set to is debatable, but if it's
>> committed then it should conform.
>>
>> <snip>
>>
>> -mike
>>
>>

Re: 80-column line width & auto-generated model classes

Posted by Donald Woods <dw...@apache.org>.

Michael Dick wrote:
> On Fri, Jun 5, 2009 at 10:17 AM, Pinaki Poddar <pp...@apache.org> wrote:
> 
>> Hi Mike,
>>> Are the files generated during the build process or are they committed to
>>> SVN?
>> They are committed to SVN. Other Junit Test code needs them at
>> development/compile time.
>>
> 
> Why can't we run the tool to generate the code during the build? Ideally
> after running checkstyle, but if we can't do that then we can always disable
> the check.
> 

Agree.  Maybe by using the process-resource goal and antrun plugin?

But, I could also see where we would want a handful of these checked in, 
  as a test to compare what the mapping tool is creating versus what we 
expect.

> 
>>> I think they should comply before we commit them.
>> They are generated by an automatic source code writer. The writer/code
>> generator does not  have a notion of line length limit during output. To
>> enforce it via that code generator is neither trivial for the way it emits
>> different code elements nor I have bandwidth to invest. If compliance to
>> line length limit is paramount, then whichever issue (I still could not
>> find
>> that JIRA) is handling that task may take that up.
>>
> 
> I think that compliance to code conventions is paramount for anything we
> commit to SVN. What the line length is set to is debatable, but if it's
> committed then it should conform.
> 
> <snip>
> 
> -mike
> 

Re: 80-column line width & auto-generated model classes

Posted by Michael Dick <mi...@gmail.com>.
On Fri, Jun 5, 2009 at 10:17 AM, Pinaki Poddar <pp...@apache.org> wrote:

>
> Hi Mike,
> > Are the files generated during the build process or are they committed to
> > SVN?
> They are committed to SVN. Other Junit Test code needs them at
> development/compile time.
>

Why can't we run the tool to generate the code during the build? Ideally
after running checkstyle, but if we can't do that then we can always disable
the check.


> > I think they should comply before we commit them.
>
> They are generated by an automatic source code writer. The writer/code
> generator does not  have a notion of line length limit during output. To
> enforce it via that code generator is neither trivial for the way it emits
> different code elements nor I have bandwidth to invest. If compliance to
> line length limit is paramount, then whichever issue (I still could not
> find
> that JIRA) is handling that task may take that up.
>

I think that compliance to code conventions is paramount for anything we
commit to SVN. What the line length is set to is debatable, but if it's
committed then it should conform.

<snip>

-mike

Re: 80-column line width & auto-generated model classes

Posted by Pinaki Poddar <pp...@apache.org>.
Hi Mike,
> Are the files generated during the build process or are they committed to
> SVN?
They are committed to SVN. Other Junit Test code needs them at
development/compile time.

> I think they should comply before we commit them.

They are generated by an automatic source code writer. The writer/code
generator does not  have a notion of line length limit during output. To
enforce it via that code generator is neither trivial for the way it emits
different code elements nor I have bandwidth to invest. If compliance to
line length limit is paramount, then whichever issue (I still could not find
that JIRA) is handling that task may take that up.




Michael Dick wrote:
> 
> Are the files generated during the build process or are they committed to
> SVN?
> 
> If they're part of the build process then it's fair to exclude them, if
> they're generated and then committed to SVN then I think they should
> comply
> before we commit them.
> 
> -mike
> 
> On Fri, Jun 5, 2009 at 8:36 AM, Pinaki Poddar <pp...@apache.org> wrote:
> 
>>
>> Hi,
>> > If there's any way to exclude these files
>> 1. These files are created under openjpa-persistence-jdbc module's test
>> packages
>> 2. They are always named with a underscore at the end i.e. say
>> Person_.java
>>
>>
>> Craig L Russell wrote:
>> >
>> >
>> > On Jun 4, 2009, at 9:38 AM, Pinaki Poddar wrote:
>> >
>> >>
>> >> Hi,
>> >>  We are now checking in *.java files for canonical meta-model
>> >> classes in
>> >> SVN. Source code for these classes are auto-generated and may exceed
>> >> 80-column per line. Noticed some work on enforcing 80-column limit
>> >> on test
>> >> source code -- can't locate the exact issue -- but anyway that work
>> >> must
>> >> consider exception for these auto-generated source files.
>> >
>> > +1 Let's not worry about generated files exceeding the 80 character
>> > line limit. If there's any way to exclude these files from the checker
>> > this should be an exception.
>> >
>> > Craig
>> >>
>> >>
>> >> -----
>> >> Pinaki Poddar                      http://ppoddar.blogspot.com/
>> >>
>> >> http://www.linkedin.com/in/pinakipoddar
>> >> OpenJPA PMC Member/Committer
>> >> JPA Expert Group Member
>> >> --
>> >> View this message in context:
>> >>
>> http://n2.nabble.com/80-column-line-width---auto-generated-model-classes-tp3025746p3025746.html
>> >> Sent from the OpenJPA Developers mailing list archive at Nabble.com.
>> >>
>> >
>> > Craig L Russell
>> > Architect, Sun Java Enterprise System http://db.apache.org/jdo
>> > 408 276-5638 mailto:Craig.Russell@sun.com
>> > P.S. A good JDO? O, Gasp!
>> >
>> >
>> >
>> >
>>
>>
>> -----
>> Pinaki Poddar                      http://ppoddar.blogspot.com/
>>
>> http://www.linkedin.com/in/pinakipoddar
>> OpenJPA PMC Member/Committer
>> JPA Expert Group Member
>> --
>> View this message in context:
>> http://n2.nabble.com/80-column-line-width---auto-generated-model-classes-tp3025746p3030320.html
>> Sent from the OpenJPA Developers mailing list archive at Nabble.com.
>>
>>
> 
> 


-----
Pinaki Poddar                      http://ppoddar.blogspot.com/
                                      
http://www.linkedin.com/in/pinakipoddar
OpenJPA PMC Member/Committer
JPA Expert Group Member
-- 
View this message in context: http://n2.nabble.com/80-column-line-width---auto-generated-model-classes-tp3025746p3030904.html
Sent from the OpenJPA Developers mailing list archive at Nabble.com.


Re: 80-column line width & auto-generated model classes

Posted by Pinaki Poddar <pp...@apache.org>.
Hi Kevin,
  > 1)  Under what conditions should we be checking in these generated
metamodel classes? 
  To construct, compile and test 'typesafe' Criteria Query.

  > We don't want the metamodel classes generated for all of our Entities,
do we?
  No, we do not. I have deactivated the annotation processor (that generates
these metamodel classes) as a part of compilation for similar reasons.

  > So, how are we determining which Entities should have generated
metamodel classes?
  The ones that participate in testing Criteria Query.

  > 2)  Our processing in this arena can help define a "best practice" for
our eventual JPA 2.0 users. 
  Correct. 

  > And, whether these should be checked into SVN or not.
  These classes must be available at compile-time for user/test application.
Within TeamCity, I could not think of any other alternative to *not*
checking them into SVN. However, I had not checked them in initially. When
Fay joined to develop tests, I took that as an opportunity to observe an
'unbiased user' and noticed that she generated these meta-model classes,
used them to write the queries and checked them into SVN. 


Kevin Sutter wrote:
> 
> A few interesting points with this discussion...
> 
> 1)  Under what conditions should we be checking in these generated
> metamodel
> classes?  We don't want the meta-model classes generated for all of our
> Entities, do we?  Seems like a waste of build time.  So, how are we
> determining which Entities should have generated meta-model classes?
> 
> 2)  Our processing in this arena can help define a "best practice" for our
> eventual JPA 2.0 users.  That is, how and when to do the meta-model
> generation.  How to package these generated classes for the application.
> And, whether these should be checked into SVN or not.
> 
> 3)  And, why do we continue to have the 80 column limit for our source
> files?  :-)  It seems so archaic.
> 
> Kevin
> 
> On Fri, Jun 5, 2009 at 8:43 AM, Michael Dick
> <mi...@gmail.com>wrote:
> 
>> Are the files generated during the build process or are they committed to
>> SVN?
>>
>> If they're part of the build process then it's fair to exclude them, if
>> they're generated and then committed to SVN then I think they should
>> comply
>> before we commit them.
>>
>> -mike
>>
>> On Fri, Jun 5, 2009 at 8:36 AM, Pinaki Poddar <pp...@apache.org> wrote:
>>
>> >
>> > Hi,
>> > > If there's any way to exclude these files
>> > 1. These files are created under openjpa-persistence-jdbc module's test
>> > packages
>> > 2. They are always named with a underscore at the end i.e. say
>> Person_.java
>> >
>> >
>> > Craig L Russell wrote:
>> > >
>> > >
>> > > On Jun 4, 2009, at 9:38 AM, Pinaki Poddar wrote:
>> > >
>> > >>
>> > >> Hi,
>> > >>  We are now checking in *.java files for canonical meta-model
>> > >> classes in
>> > >> SVN. Source code for these classes are auto-generated and may exceed
>> > >> 80-column per line. Noticed some work on enforcing 80-column limit
>> > >> on test
>> > >> source code -- can't locate the exact issue -- but anyway that work
>> > >> must
>> > >> consider exception for these auto-generated source files.
>> > >
>> > > +1 Let's not worry about generated files exceeding the 80 character
>> > > line limit. If there's any way to exclude these files from the
>> checker
>> > > this should be an exception.
>> > >
>> > > Craig
>> > >>
>> > >>
>> > >> -----
>> > >> Pinaki Poddar                      http://ppoddar.blogspot.com/
>> > >>
>> > >> http://www.linkedin.com/in/pinakipoddar
>> > >> OpenJPA PMC Member/Committer
>> > >> JPA Expert Group Member
>> > >> --
>> > >> View this message in context:
>> > >>
>> >
>> http://n2.nabble.com/80-column-line-width---auto-generated-model-classes-tp3025746p3025746.html
>> > >> Sent from the OpenJPA Developers mailing list archive at Nabble.com.
>> > >>
>> > >
>> > > Craig L Russell
>> > > Architect, Sun Java Enterprise System http://db.apache.org/jdo
>> > > 408 276-5638 mailto:Craig.Russell@sun.com
>> > > P.S. A good JDO? O, Gasp!
>> > >
>> > >
>> > >
>> > >
>> >
>> >
>> > -----
>> > Pinaki Poddar                      http://ppoddar.blogspot.com/
>> >
>> > http://www.linkedin.com/in/pinakipoddar
>> > OpenJPA PMC Member/Committer
>> > JPA Expert Group Member
>> > --
>> > View this message in context:
>> >
>> http://n2.nabble.com/80-column-line-width---auto-generated-model-classes-tp3025746p3030320.html
>> > Sent from the OpenJPA Developers mailing list archive at Nabble.com.
>> >
>> >
>>
> 
> 


-----
Pinaki Poddar                      http://ppoddar.blogspot.com/
                                      
http://www.linkedin.com/in/pinakipoddar
OpenJPA PMC Member/Committer
JPA Expert Group Member
-- 
View this message in context: http://n2.nabble.com/80-column-line-width---auto-generated-model-classes-tp3025746p3030862.html
Sent from the OpenJPA Developers mailing list archive at Nabble.com.


Re: 80-column line width & auto-generated model classes

Posted by Michael Dick <mi...@gmail.com>.
Conventions will never please everyone, especially line length which is
always arbitrary.

The checkstyle manual has the following rationale :
LineLength

Rationale: Long lines are hard to read in printouts or if developers have
limited screen space for the source code, e.g. if the IDE displays
additional information like project tree, class hierarchy, etc.

My two cents :

Code conventions should make the code more readable, ones that make it
tougher to express meaning should be changed. Line length appears to be
falling into the latter category (splitting import statements like I had to
do for some test classes is ugly).

If we want to increase the length we should bring it up for a VOTE in a
separate thread and use this thread to discuss exclusions for generated
classes.

-mike


On Fri, Jun 5, 2009 at 9:33 AM, Rick Curtis <cu...@gmail.com> wrote:

>
> +1
>
> I think that we need to enforce some sort of coding standards, but I don't
> think we should be blindly enforcing conventions that are out of date. Take
> a look at the 'official' Sun code conventions [1] and note that they
> haven't
> been updated since April 20, 1999. I particularly like the reason for the
> 80-column line [2]... 'Avoid lines longer than 80 characters, since they're
> not handled well by many terminals and tools.'
>
> [1] http://java.sun.com/docs/codeconv/
> [2] http://java.sun.com/docs/codeconv/html/CodeConventions.doc3.html#313
>
>
> Kevin Sutter wrote:
> >
> > A few interesting points with this discussion...
> >
> > 1)  Under what conditions should we be checking in these generated
> > metamodel
> > classes?  We don't want the metamodel classes generated for all of our
> > Entities, do we?  Seems like a waste of build time.  So, how are we
> > determining which Entities should have generated metamodel classes?
> >
> > 2)  Our processing in this arena can help define a "best practice" for
> our
> > eventual JPA 2.0 users.  That is, how and when to do the metamodel
> > generation.  How to package these generated classes for the application.
> > And, whether these should be checked into SVN or not.
> >
> > 3)  And, why do we continue to have the 80 column limit for our source
> > files?  :-)  It seems so archaic.
> >
> > Kevin
> >
> --
> View this message in context:
> http://n2.nabble.com/80-column-line-width---auto-generated-model-classes-tp3025746p3030641.html
> Sent from the OpenJPA Developers mailing list archive at Nabble.com.
>
>

Re: 80-column line width & auto-generated model classes

Posted by in...@dvholten.de.
+1
however, i thought the 80 char limit has something to do with the default 
http - port...
when browsing the code as a newcomer one finds quite a number of 'unusual' 
linebreaks
which cut off the last method argument, for example.
The source-code is limited to 80 chars, but it requires JDK5 to compile...

otoh, no limits is the other extreme - i'd propose something like 100 or 
120

upcoming version 2 might be a good date to introduce new coding style.

have a nice weekend

Re: 80-column line width & auto-generated model classes

Posted by Rick Curtis <cu...@gmail.com>.
+1 

I think that we need to enforce some sort of coding standards, but I don't
think we should be blindly enforcing conventions that are out of date. Take
a look at the 'official' Sun code conventions [1] and note that they haven't
been updated since April 20, 1999. I particularly like the reason for the
80-column line [2]... 'Avoid lines longer than 80 characters, since they're
not handled well by many terminals and tools.'

[1] http://java.sun.com/docs/codeconv/
[2] http://java.sun.com/docs/codeconv/html/CodeConventions.doc3.html#313


Kevin Sutter wrote:
> 
> A few interesting points with this discussion...
> 
> 1)  Under what conditions should we be checking in these generated
> metamodel
> classes?  We don't want the metamodel classes generated for all of our
> Entities, do we?  Seems like a waste of build time.  So, how are we
> determining which Entities should have generated metamodel classes?
> 
> 2)  Our processing in this arena can help define a "best practice" for our
> eventual JPA 2.0 users.  That is, how and when to do the metamodel
> generation.  How to package these generated classes for the application.
> And, whether these should be checked into SVN or not.
> 
> 3)  And, why do we continue to have the 80 column limit for our source
> files?  :-)  It seems so archaic.
> 
> Kevin
> 
-- 
View this message in context: http://n2.nabble.com/80-column-line-width---auto-generated-model-classes-tp3025746p3030641.html
Sent from the OpenJPA Developers mailing list archive at Nabble.com.


Re: 80-column line width & auto-generated model classes

Posted by Kevin Sutter <kw...@gmail.com>.
A few interesting points with this discussion...

1)  Under what conditions should we be checking in these generated metamodel
classes?  We don't want the metamodel classes generated for all of our
Entities, do we?  Seems like a waste of build time.  So, how are we
determining which Entities should have generated metamodel classes?

2)  Our processing in this arena can help define a "best practice" for our
eventual JPA 2.0 users.  That is, how and when to do the metamodel
generation.  How to package these generated classes for the application.
And, whether these should be checked into SVN or not.

3)  And, why do we continue to have the 80 column limit for our source
files?  :-)  It seems so archaic.

Kevin

On Fri, Jun 5, 2009 at 8:43 AM, Michael Dick <mi...@gmail.com>wrote:

> Are the files generated during the build process or are they committed to
> SVN?
>
> If they're part of the build process then it's fair to exclude them, if
> they're generated and then committed to SVN then I think they should comply
> before we commit them.
>
> -mike
>
> On Fri, Jun 5, 2009 at 8:36 AM, Pinaki Poddar <pp...@apache.org> wrote:
>
> >
> > Hi,
> > > If there's any way to exclude these files
> > 1. These files are created under openjpa-persistence-jdbc module's test
> > packages
> > 2. They are always named with a underscore at the end i.e. say
> Person_.java
> >
> >
> > Craig L Russell wrote:
> > >
> > >
> > > On Jun 4, 2009, at 9:38 AM, Pinaki Poddar wrote:
> > >
> > >>
> > >> Hi,
> > >>  We are now checking in *.java files for canonical meta-model
> > >> classes in
> > >> SVN. Source code for these classes are auto-generated and may exceed
> > >> 80-column per line. Noticed some work on enforcing 80-column limit
> > >> on test
> > >> source code -- can't locate the exact issue -- but anyway that work
> > >> must
> > >> consider exception for these auto-generated source files.
> > >
> > > +1 Let's not worry about generated files exceeding the 80 character
> > > line limit. If there's any way to exclude these files from the checker
> > > this should be an exception.
> > >
> > > Craig
> > >>
> > >>
> > >> -----
> > >> Pinaki Poddar                      http://ppoddar.blogspot.com/
> > >>
> > >> http://www.linkedin.com/in/pinakipoddar
> > >> OpenJPA PMC Member/Committer
> > >> JPA Expert Group Member
> > >> --
> > >> View this message in context:
> > >>
> >
> http://n2.nabble.com/80-column-line-width---auto-generated-model-classes-tp3025746p3025746.html
> > >> Sent from the OpenJPA Developers mailing list archive at Nabble.com.
> > >>
> > >
> > > Craig L Russell
> > > Architect, Sun Java Enterprise System http://db.apache.org/jdo
> > > 408 276-5638 mailto:Craig.Russell@sun.com
> > > P.S. A good JDO? O, Gasp!
> > >
> > >
> > >
> > >
> >
> >
> > -----
> > Pinaki Poddar                      http://ppoddar.blogspot.com/
> >
> > http://www.linkedin.com/in/pinakipoddar
> > OpenJPA PMC Member/Committer
> > JPA Expert Group Member
> > --
> > View this message in context:
> >
> http://n2.nabble.com/80-column-line-width---auto-generated-model-classes-tp3025746p3030320.html
> > Sent from the OpenJPA Developers mailing list archive at Nabble.com.
> >
> >
>

Re: 80-column line width & auto-generated model classes

Posted by Michael Dick <mi...@gmail.com>.
Are the files generated during the build process or are they committed to
SVN?

If they're part of the build process then it's fair to exclude them, if
they're generated and then committed to SVN then I think they should comply
before we commit them.

-mike

On Fri, Jun 5, 2009 at 8:36 AM, Pinaki Poddar <pp...@apache.org> wrote:

>
> Hi,
> > If there's any way to exclude these files
> 1. These files are created under openjpa-persistence-jdbc module's test
> packages
> 2. They are always named with a underscore at the end i.e. say Person_.java
>
>
> Craig L Russell wrote:
> >
> >
> > On Jun 4, 2009, at 9:38 AM, Pinaki Poddar wrote:
> >
> >>
> >> Hi,
> >>  We are now checking in *.java files for canonical meta-model
> >> classes in
> >> SVN. Source code for these classes are auto-generated and may exceed
> >> 80-column per line. Noticed some work on enforcing 80-column limit
> >> on test
> >> source code -- can't locate the exact issue -- but anyway that work
> >> must
> >> consider exception for these auto-generated source files.
> >
> > +1 Let's not worry about generated files exceeding the 80 character
> > line limit. If there's any way to exclude these files from the checker
> > this should be an exception.
> >
> > Craig
> >>
> >>
> >> -----
> >> Pinaki Poddar                      http://ppoddar.blogspot.com/
> >>
> >> http://www.linkedin.com/in/pinakipoddar
> >> OpenJPA PMC Member/Committer
> >> JPA Expert Group Member
> >> --
> >> View this message in context:
> >>
> http://n2.nabble.com/80-column-line-width---auto-generated-model-classes-tp3025746p3025746.html
> >> Sent from the OpenJPA Developers mailing list archive at Nabble.com.
> >>
> >
> > Craig L Russell
> > Architect, Sun Java Enterprise System http://db.apache.org/jdo
> > 408 276-5638 mailto:Craig.Russell@sun.com
> > P.S. A good JDO? O, Gasp!
> >
> >
> >
> >
>
>
> -----
> Pinaki Poddar                      http://ppoddar.blogspot.com/
>
> http://www.linkedin.com/in/pinakipoddar
> OpenJPA PMC Member/Committer
> JPA Expert Group Member
> --
> View this message in context:
> http://n2.nabble.com/80-column-line-width---auto-generated-model-classes-tp3025746p3030320.html
> Sent from the OpenJPA Developers mailing list archive at Nabble.com.
>
>

Re: 80-column line width & auto-generated model classes

Posted by Pinaki Poddar <pp...@apache.org>.
Hi,
> If there's any way to exclude these files
1. These files are created under openjpa-persistence-jdbc module's test
packages 
2. They are always named with a underscore at the end i.e. say Person_.java


Craig L Russell wrote:
> 
> 
> On Jun 4, 2009, at 9:38 AM, Pinaki Poddar wrote:
> 
>>
>> Hi,
>>  We are now checking in *.java files for canonical meta-model  
>> classes in
>> SVN. Source code for these classes are auto-generated and may exceed
>> 80-column per line. Noticed some work on enforcing 80-column limit  
>> on test
>> source code -- can't locate the exact issue -- but anyway that work  
>> must
>> consider exception for these auto-generated source files.
> 
> +1 Let's not worry about generated files exceeding the 80 character  
> line limit. If there's any way to exclude these files from the checker  
> this should be an exception.
> 
> Craig
>>
>>
>> -----
>> Pinaki Poddar                      http://ppoddar.blogspot.com/
>>
>> http://www.linkedin.com/in/pinakipoddar
>> OpenJPA PMC Member/Committer
>> JPA Expert Group Member
>> -- 
>> View this message in context:
>> http://n2.nabble.com/80-column-line-width---auto-generated-model-classes-tp3025746p3025746.html
>> Sent from the OpenJPA Developers mailing list archive at Nabble.com.
>>
> 
> Craig L Russell
> Architect, Sun Java Enterprise System http://db.apache.org/jdo
> 408 276-5638 mailto:Craig.Russell@sun.com
> P.S. A good JDO? O, Gasp!
> 
> 
>  
> 


-----
Pinaki Poddar                      http://ppoddar.blogspot.com/
                                      
http://www.linkedin.com/in/pinakipoddar
OpenJPA PMC Member/Committer
JPA Expert Group Member
-- 
View this message in context: http://n2.nabble.com/80-column-line-width---auto-generated-model-classes-tp3025746p3030320.html
Sent from the OpenJPA Developers mailing list archive at Nabble.com.


Re: 80-column line width & auto-generated model classes

Posted by Craig L Russell <Cr...@Sun.COM>.
On Jun 4, 2009, at 9:38 AM, Pinaki Poddar wrote:

>
> Hi,
>  We are now checking in *.java files for canonical meta-model  
> classes in
> SVN. Source code for these classes are auto-generated and may exceed
> 80-column per line. Noticed some work on enforcing 80-column limit  
> on test
> source code -- can't locate the exact issue -- but anyway that work  
> must
> consider exception for these auto-generated source files.

+1 Let's not worry about generated files exceeding the 80 character  
line limit. If there's any way to exclude these files from the checker  
this should be an exception.

Craig
>
>
> -----
> Pinaki Poddar                      http://ppoddar.blogspot.com/
>
> http://www.linkedin.com/in/pinakipoddar
> OpenJPA PMC Member/Committer
> JPA Expert Group Member
> -- 
> View this message in context: http://n2.nabble.com/80-column-line-width---auto-generated-model-classes-tp3025746p3025746.html
> Sent from the OpenJPA Developers mailing list archive at Nabble.com.
>

Craig L Russell
Architect, Sun Java Enterprise System http://db.apache.org/jdo
408 276-5638 mailto:Craig.Russell@sun.com
P.S. A good JDO? O, Gasp!


Re: 80-column line width & auto-generated model classes

Posted by Pinaki Poddar <pp...@apache.org>.
Hi,
  hmm...thought about that. The code generator recognizes 'comment section'
-- and actually now adds some fixed string like "Generated by OpenJPA
MetaModel Generator Tool.". But does not have a facility to include content
from a 'comment header file'. Anyone interested to tweak?



DWoods wrote:
> 
> We just need to make sure these files have the ASF header, since we're 
> checking them into svn and they'll be included in the source assembly...
> 
> 
> -Donald
> 
> 
> Pinaki Poddar wrote:
>> Hi,
>>   We are now checking in *.java files for canonical meta-model classes in
>> SVN. Source code for these classes are auto-generated and may exceed
>> 80-column per line. Noticed some work on enforcing 80-column limit on
>> test
>> source code -- can't locate the exact issue -- but anyway that work must
>> consider exception for these auto-generated source files.
>> 
>> -----
>> Pinaki Poddar                      http://ppoddar.blogspot.com/
>>                                       
>> http://www.linkedin.com/in/pinakipoddar
>> OpenJPA PMC Member/Committer
>> JPA Expert Group Member
> 
> 


-----
Pinaki Poddar                      http://ppoddar.blogspot.com/
                                      
http://www.linkedin.com/in/pinakipoddar
OpenJPA PMC Member/Committer
JPA Expert Group Member
-- 
View this message in context: http://n2.nabble.com/80-column-line-width---auto-generated-model-classes-tp3025746p3030941.html
Sent from the OpenJPA Developers mailing list archive at Nabble.com.


Re: 80-column line width & auto-generated model classes

Posted by Donald Woods <dw...@apache.org>.
We just need to make sure these files have the ASF header, since we're 
checking them into svn and they'll be included in the source assembly...


-Donald


Pinaki Poddar wrote:
> Hi,
>   We are now checking in *.java files for canonical meta-model classes in
> SVN. Source code for these classes are auto-generated and may exceed
> 80-column per line. Noticed some work on enforcing 80-column limit on test
> source code -- can't locate the exact issue -- but anyway that work must
> consider exception for these auto-generated source files.
> 
> -----
> Pinaki Poddar                      http://ppoddar.blogspot.com/
>                                       
> http://www.linkedin.com/in/pinakipoddar
> OpenJPA PMC Member/Committer
> JPA Expert Group Member