public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Usage of checkpatch.pl for other projects
@ 2010-03-23  9:37 Sylvestre Ledru
  2010-08-17 16:01 ` Andy Whitcroft
  0 siblings, 1 reply; 6+ messages in thread
From: Sylvestre Ledru @ 2010-03-23  9:37 UTC (permalink / raw)
  To: Andy Whitcroft, Andrew Morton, Daniel Walker, Joe Perches,
	linux-kernel

Hello,

I saw the very interesting presentation of Greg at the last FOSDEM where
he explained how to write a patch of the kernel. 

During his presentation, he presented the script checkpatch.pl which
checks the coding style of a patch / file. 

For a while, I have been looking for such script which can check the
compliance of a source code against a coding policy.

Obviously, the coding style of my project is not exactly the same as he
Kernel one. 

Therefor, I would like to know if there is any plan of making a
dedicated project of this piece of software to allow usage of it for
other projects.
If it is not the case, is it possible to contribute to change the
behavior of the policy check (of course, disable by default for kernel
hackers) ?

Thanks,
Sylvestre



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Usage of checkpatch.pl for other projects
@ 2010-04-13  8:35 Sylvestre Ledru
  0 siblings, 0 replies; 6+ messages in thread
From: Sylvestre Ledru @ 2010-04-13  8:35 UTC (permalink / raw)
  To: Andy Whitcroft, Andrew Morton, Daniel Walker, Joe Perches,
	linux-kernel

Hello,

I saw the very interesting presentation of Greg at the last FOSDEM where
he explained how to write a patch of the kernel. 

During his presentation, he presented the script checkpatch.pl which
checks the coding style of a patch / file. 

For a while, I have been looking for such script which can check the
compliance of a source code against a coding policy.

Obviously, the coding style of my project is not exactly the same as he
Kernel one. 

Therefor, I would like to know if there is any plan of making a
dedicated project of this piece of software to allow usage of it for
other projects.
If it is not the case, is it possible to contribute to change the
behavior of the policy check (of course, disable by default for kernel
hackers) ?

Thanks,
Sylvestre




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Usage of checkpatch.pl for other projects
  2010-03-23  9:37 Usage of checkpatch.pl for other projects Sylvestre Ledru
@ 2010-08-17 16:01 ` Andy Whitcroft
  2010-08-17 16:16   ` Sylvestre Ledru
  0 siblings, 1 reply; 6+ messages in thread
From: Andy Whitcroft @ 2010-08-17 16:01 UTC (permalink / raw)
  To: Sylvestre Ledru; +Cc: Andrew Morton, Daniel Walker, Joe Perches, linux-kernel

On Tue, Mar 23, 2010 at 10:37:54AM +0100, Sylvestre Ledru wrote:
> Hello,
> 
> I saw the very interesting presentation of Greg at the last FOSDEM where
> he explained how to write a patch of the kernel. 
> 
> During his presentation, he presented the script checkpatch.pl which
> checks the coding style of a patch / file. 
> 
> For a while, I have been looking for such script which can check the
> compliance of a source code against a coding policy.
> 
> Obviously, the coding style of my project is not exactly the same as he
> Kernel one. 
> 
> Therefor, I would like to know if there is any plan of making a
> dedicated project of this piece of software to allow usage of it for
> other projects.
> If it is not the case, is it possible to contribute to change the
> behavior of the policy check (of course, disable by default for kernel
> hackers) ?

An interesting question.  Cirtianly most of its behaviour is kernel
centric.  The source kinda lives outside the kernel with its tests
so could be consumed by other projects (though we do keep a copy in the
kernel tree too).  If changes could be conditional on the project I
could see it being possible.  What sort of differences are you thinking
about.

-apw

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Usage of checkpatch.pl for other projects
  2010-08-17 16:01 ` Andy Whitcroft
@ 2010-08-17 16:16   ` Sylvestre Ledru
  2010-08-17 16:32     ` Joe Perches
  0 siblings, 1 reply; 6+ messages in thread
From: Sylvestre Ledru @ 2010-08-17 16:16 UTC (permalink / raw)
  To: Andy Whitcroft; +Cc: Andrew Morton, Daniel Walker, Joe Perches, linux-kernel

Le mardi 17 août 2010 à 17:01 +0100, Andy Whitcroft a écrit :
> On Tue, Mar 23, 2010 at 10:37:54AM +0100, Sylvestre Ledru wrote:
> > Hello,
> > 
> > I saw the very interesting presentation of Greg at the last FOSDEM where
> > he explained how to write a patch of the kernel. 
> > 
> > During his presentation, he presented the script checkpatch.pl which
> > checks the coding style of a patch / file. 
> > 
> > For a while, I have been looking for such script which can check the
> > compliance of a source code against a coding policy.
> > 
> > Obviously, the coding style of my project is not exactly the same as he
> > Kernel one. 
> > 
> > Therefor, I would like to know if there is any plan of making a
> > dedicated project of this piece of software to allow usage of it for
> > other projects.
> > If it is not the case, is it possible to contribute to change the
> > behavior of the policy check (of course, disable by default for kernel
> > hackers) ?
> 
> An interesting question.  Cirtianly most of its behaviour is kernel
> centric.  The source kinda lives outside the kernel with its tests
Is there a dedicated website for this project ?

> so could be consumed by other projects (though we do keep a copy in the
> kernel tree too).  If changes could be conditional on the project I
> could see it being possible.  What sort of differences are you thinking
> about.
At first, mainly basic things like space or not before a brace, if a
brace should be on the same line as the if or not, etc. This kind of
basic things.

Sylvestre

-- 
-------------------------
Sylvestre Ledru
-------------------------
The Scilab Consortium
Digiteo
Domaine de Voluceau
Rocquencourt - B.P. 105
78153 Le Chesnay Cedex
France


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Usage of checkpatch.pl for other projects
  2010-08-17 16:16   ` Sylvestre Ledru
@ 2010-08-17 16:32     ` Joe Perches
  2010-08-22 20:50       ` Sylvestre Ledru
  0 siblings, 1 reply; 6+ messages in thread
From: Joe Perches @ 2010-08-17 16:32 UTC (permalink / raw)
  To: Sylvestre Ledru
  Cc: Andy Whitcroft, Andrew Morton, Daniel Walker, linux-kernel

On Tue, 2010-08-17 at 18:16 +0200, Sylvestre Ledru wrote:
> Le mardi 17 août 2010 à 17:01 +0100, Andy Whitcroft a écrit :
> > What sort of differences are you thinking about.
> At first, mainly basic things like space or not before a brace, if a
> brace should be on the same line as the if or not, etc. This kind of
> basic things.

It might be better to use a script that uses
a combination of patch, indent with some
project specific options and diff to highlight
how a proposed patch might vary from project
coding standards.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Usage of checkpatch.pl for other projects
  2010-08-17 16:32     ` Joe Perches
@ 2010-08-22 20:50       ` Sylvestre Ledru
  0 siblings, 0 replies; 6+ messages in thread
From: Sylvestre Ledru @ 2010-08-22 20:50 UTC (permalink / raw)
  To: Joe Perches; +Cc: Andy Whitcroft, Andrew Morton, Daniel Walker, linux-kernel

Le mardi 17 août 2010 à 09:32 -0700, Joe Perches a écrit :
> On Tue, 2010-08-17 at 18:16 +0200, Sylvestre Ledru wrote:
> > Le mardi 17 août 2010 à 17:01 +0100, Andy Whitcroft a écrit :
> > > What sort of differences are you thinking about.
> > At first, mainly basic things like space or not before a brace, if a
> > brace should be on the same line as the if or not, etc. This kind of
> > basic things.
> 
> It might be better to use a script that uses
> a combination of patch, indent with some
> project specific options and diff to highlight
> how a proposed patch might vary from project
> coding standards.
This might be a good way to start. 
We could also create a configuration file with default being the Linux
Kernel's coding styles.

Sylvestre

-- 
-------------------------
Sylvestre Ledru
-------------------------
The Scilab Consortium
Digiteo
Domaine de Voluceau
Rocquencourt - B.P. 105
78153 Le Chesnay Cedex
France


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-08-23  8:02 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-23  9:37 Usage of checkpatch.pl for other projects Sylvestre Ledru
2010-08-17 16:01 ` Andy Whitcroft
2010-08-17 16:16   ` Sylvestre Ledru
2010-08-17 16:32     ` Joe Perches
2010-08-22 20:50       ` Sylvestre Ledru
  -- strict thread matches above, loose matches on Subject: below --
2010-04-13  8:35 Sylvestre Ledru

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox