RE: Coding Stds

Jacob Kjome <[email protected]>
Newsgroups gmane.comp.java.enhydra.barracuda.general
Message-ID <[email protected]>
Alternatively, we could set up automated code formatting using Jalopy.  The 
Log4j and Log4j-sandbox projects use it and it works great!  The rules are 
specified in an XML config file and you just run your code through 
it.  This way, there is much less concern about how the code is actually 
submitted to us.  Maybe we can look into setting this up in the Barracuda 
build?  Additionally, we could also use CheckStyle to verify that all the 
coding standards have been followed (besides formatting).  This is also 
defined in an XML config file.  This would make things much more uniform 
and make all of this less of an issue.

Jake

At 01:49 PM 9/16/2003 -0400, you wrote:
> > Sorry, I always use tabs for indentation and was too lazy to alter the IDE
> > configuration only for this.
>
>Please please please - as much as I want to _encourage_ community
>contributions, please take the time to follow the Barracuda coding
>guidelines as described here:
>http://barracudamvc.org/Barracuda/docs/coding_standards.html
>
>If you can take the time to submit your code in this format, it makes it
>much more likely that a committer will actually apply your patch; while
>things like "spaces vs. tabbing" may seem trivial, it actually is a major
>pain in the butt when you have people who use the framework and viewing the
>code on Unix vs. Windows (you wouldn't believe how contentious some of those
>early discussions were as we tried to hammer out standards that worked for
>everyone). So once again, PLEASE take the time to make your code conform to
>Barracuda standards before you submit your patch!
>
>THanks,
>Christian
>
>(P.S. Thorsten - please don't take this as personally directed towards you;
>you're comments just served as the trigger to remind me to mention this,
>since its been a while since we've discussed it)
>
>----------------------------------------------
>Christian Cryder
>Internet Architect, ATMReports.com
>Project Chair, BarracudaMVC - http://barracudamvc.org
>----------------------------------------------
>"Coffee? I could quit anytime, just not today"
>
>
> > -----Original Message-----
> > From: [email protected]
> > [mailto:[email protected]]On Behalf Of Thorsten Möller
> > Sent: Tuesday, September 16, 2003 1:19 PM
> > To: [email protected]
> > Subject: [Barracuda] Re: Re: enhancement request for Ant event builder
> > task
> >
> >
> > Jacob Kjome <[email protected]> wrote:
> >
> > > I've never actually bothered to use the "template" attribute of the
> > > <build-events> tag.
> > And I even think you didn't used another template at all, because of your
> > Barracuda leadership ;-)
> >
> > >  What have you used as a sample value for the "template"
> > > attribute?  Is it a fully qualified path to the file from the root of
> > > the classloader such as?...
> > On my tests I used a relative path, ergo not starting with "/" and it
> > worked. If you view the implementation of
> > Class.getResourceAsStream() method
> > (Java 1.4.1):
> >
> > public InputStream getResourceAsStream(String name) {
> >     name = resolveName(name);
> >     ClassLoader cl = getClassLoader0();
> >     if (cl==null) {
> >         // A system class.
> >         return ClassLoader.getSystemResourceAsStream(name);
> >     }
> >     return cl.getResourceAsStream(name);
> > }
> >
> > ... as you see, there is a simple delegation to the classloader.
> > Additionally the Java doc says:
> > * <p> This method delegates the call to its class loader, after making
> > * these changes to the resource name: if the resource name starts with
> > * "/", it is unchanged; otherwise, the package name is prepended to the
> > * resource name after converting "." to "/". If this object was loaded by
> > * the bootstrap loader, the call is delegated to
> > * <code>ClassLoader.getSystemResourceAsStream</code>.
> >
> > So:
> >
> > getClass().getResourceAsStream(cs.template)
> > getClass().getClassLoader().getResourceAsStream(cs.template)
> >
> > ... is pretty the same.
> >
> >
> > > Oh, and try to make sure you use spaces instead of tabs with
> > > a 4 spaces indentation.
> > Sorry, I always use tabs for indentation and was too lazy to alter the IDE
> > configuration only for this.
> >
> >
> > Thorsten
> >
> > _______________________________________________
> > Barracuda mailing list
> > [email protected]
> > http://barracudamvc.org/lists/listinfo/barracuda
>
>_______________________________________________
>Barracuda mailing list
>[email protected]
>http://barracudamvc.org/lists/listinfo/barracuda
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.