streams-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sblackmon <sblack...@apache.org>
Subject Re: [DISCUSS] Coding style conventions + auto-formatting
Date Tue, 08 Nov 2016 16:39:05 GMT
I’ve set up checkstyle and scalastyle (bound to validate phase, no fail on error) over in 

https://github.com/steveblackmon/incubator-streams-master/tree/STREAMS-439
https://github.com/steveblackmon/incubator-streams/tree/STREAMS-439

and started refactoring code to match the google style in

https://github.com/steveblackmon/incubator-streams/tree/STREAMS-440

The google_style.xml that ships with the plugin needs a few tweaks:

- we need org.apache.streams.* to be at the top of the import list, not com.google.*
- 100 characters per line isn’t enough.  I think we can make 140 work. 

So I still need to figure out where / how to publish a modified check style file so that works
transparently across all three repos.

If anyone has specific ideas about how to systematically modify existing code to match the
style guide, please let me know over in 
https://issues.apache.org/jira/browse/STREAMS-449

Steve
On November 2, 2016 at 6:11:51 AM, Praveen Adlakha (praveen.adlakha@inmobi.com) wrote:

Hi All,  

+1 for maven checkstyle plugin it's a widely accepted solution to the  
problem at hand.  

Minor nit: We can think in terms of creating a different profile to run  
checkstyle plugin it kind of ease the development when a developer is  
working on enhancements which require a lot of code.  

Thanks  
Praveen  

On Sat, Oct 29, 2016 at 12:28 AM, Timothy Spann <tspann@hortonworks.com>  
wrote:  

> >  
>  
> +1 for Google. Easy to import into any IDE and enforced with  
> checkstyle.  
>  
>  
> >  
> > -  
> > https://github.com/twitter/commons/blob/master/src/java/  
> com/twitter/common/styleguide.md  
> >  
> > - https://opennlp.apache.org/code-conventions.html  
> >  
> > I'm sure there are more. Thoughts?  
> >  
> > Whatever happens, I'd suggest it just get enforced via Maven so we  
> don't  
> > have to kick PRs back and forth or keep discussing it. To that  
> effect I  
> > opened https://issues.apache.org/jira/browse/STREAMS-449  
>  
> https://maven.apache.org/plugins-archives/maven-checkstyle-plugin-2.16/  
>  
> And can check that from IDEs as well.  
>  
> Tim Spann  
>  
>  

--  
_____________________________________________________________  
The information contained in this communication is intended solely for the  
use of the individual or entity to whom it is addressed and others  
authorized to receive it. It may contain confidential or legally privileged  
information. If you are not the intended recipient you are hereby notified  
that any disclosure, copying, distribution or taking any action in reliance  
on the contents of this information is strictly prohibited and may be  
unlawful. If you have received this communication in error, please notify  
us immediately by responding to this email and then delete it from your  
system. The firm is neither liable for the proper and complete transmission  
of the information contained in this communication nor for any delay in its  
receipt.  

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message