* [xen 4.6 retrospective] [bad] Code style checking takes up too much time
@ 2015-08-28 15:39 Lars Kurth
2015-08-31 7:27 ` Jan Beulich
0 siblings, 1 reply; 4+ messages in thread
From: Lars Kurth @ 2015-08-28 15:39 UTC (permalink / raw)
To: xen devel, Andrew Cooper
Another one from the developer meeting
= Issue / Observation =
Code style checking takes up too much time. This affects both reviewers who spend a significant amount commenting on style issues and also makes it harder to for contributors to focus on non-style issues. What I mean by the latter is that the volume of comments that need to be tracked by contributors, makes it harder for them.
= Possible Solution / Improvement =
Automate code-style checks through a tool, that could be run as a pre-patch review tool. Once we have that, update contribution docs.
As far as I recall, Andy Cooper believes that dealing with the 2 different coding styles should not be a huge issue. A good tool could differentiate by directory / file.
What may be a bigger issue, is that older code may not fully adhere to coding standards. The open question is then
* Whether such a tool should only run on the diff/patch
* If not, how we deal with check failures in areas of a file that have not been touched by the contributor
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [xen 4.6 retrospective] [bad] Code style checking takes up too much time
2015-08-28 15:39 [xen 4.6 retrospective] [bad] Code style checking takes up too much time Lars Kurth
@ 2015-08-31 7:27 ` Jan Beulich
2015-08-31 13:24 ` Andrew Cooper
0 siblings, 1 reply; 4+ messages in thread
From: Jan Beulich @ 2015-08-31 7:27 UTC (permalink / raw)
To: Lars Kurth; +Cc: Andrew Cooper, xen devel
>>> On 28.08.15 at 17:39, <lars.kurth.xen@gmail.com> wrote:
> What may be a bigger issue, is that older code may not fully adhere to
> coding standards. The open question is then
> * Whether such a tool should only run on the diff/patch
Isn't that the intended / expected behavior of such a tool anyway?
If so, the real problem here is how the tool should determine the
style of a file being modified when that file's style isn't reasonably
clean.
> * If not, how we deal with check failures in areas of a file that have not
> been touched by the contributor
Manual inspection, using common sense to decide whether to ignore
the tools complaint?
Jan
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [xen 4.6 retrospective] [bad] Code style checking takes up too much time
2015-08-31 7:27 ` Jan Beulich
@ 2015-08-31 13:24 ` Andrew Cooper
2015-09-01 14:47 ` Ian Campbell
0 siblings, 1 reply; 4+ messages in thread
From: Andrew Cooper @ 2015-08-31 13:24 UTC (permalink / raw)
To: Jan Beulich, Lars Kurth; +Cc: xen devel
On 31/08/15 08:27, Jan Beulich wrote:
>>>> On 28.08.15 at 17:39, <lars.kurth.xen@gmail.com> wrote:
>> What may be a bigger issue, is that older code may not fully adhere to
>> coding standards. The open question is then
>> * Whether such a tool should only run on the diff/patch
> Isn't that the intended / expected behavior of such a tool anyway?
I would have thought so, and moreso only on the newly added lines.
> If so, the real problem here is how the tool should determine the
> style of a file being modified when that file's style isn't reasonably
> clean.
As we tag most files with an emacs magic block, it would be fine to have
an extra tag used by an automatic tool.
It might also be an idea for someone who uses vim to provide a vim magic
block which we also use. That might help to reduce the effort required
by contributors to get it right first time.
>
>> * If not, how we deal with check failures in areas of a file that have not
>> been touched by the contributor
> Manual inspection, using common sense to decide whether to ignore
> the tools complaint?
Ideally we would engineer such a tool to have as few false results as
possible, but there are some cases where it might be preferable (e.g.
changing the indentation of a large block) to keep the old style to aid
the clarity of the current patch. This will need to be decided on a
case-by-case basis.
~Andrew
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [xen 4.6 retrospective] [bad] Code style checking takes up too much time
2015-08-31 13:24 ` Andrew Cooper
@ 2015-09-01 14:47 ` Ian Campbell
0 siblings, 0 replies; 4+ messages in thread
From: Ian Campbell @ 2015-09-01 14:47 UTC (permalink / raw)
To: Andrew Cooper, Jan Beulich, Lars Kurth; +Cc: xen devel
On Mon, 2015-08-31 at 14:24 +0100, Andrew Cooper wrote:
> On 31/08/15 08:27, Jan Beulich wrote:
> > > > > On 28.08.15 at 17:39, <lars.kurth.xen@gmail.com> wrote:
> > > What may be a bigger issue, is that older code may not fully adhere
> > > to
> > > coding standards. The open question is then
> > > * Whether such a tool should only run on the diff/patch
> > Isn't that the intended / expected behavior of such a tool anyway?
>
> I would have thought so, and moreso only on the newly added lines.
That's what Linux's checkpatch.pl does, I think.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-09-01 14:51 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-28 15:39 [xen 4.6 retrospective] [bad] Code style checking takes up too much time Lars Kurth
2015-08-31 7:27 ` Jan Beulich
2015-08-31 13:24 ` Andrew Cooper
2015-09-01 14:47 ` Ian Campbell
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).