* CodingStyle on existing code @ 2015-12-01 13:10 Wido den Hollander 2015-12-01 13:47 ` Loic Dachary 0 siblings, 1 reply; 8+ messages in thread From: Wido den Hollander @ 2015-12-01 13:10 UTC (permalink / raw) To: ceph-devel@vger.kernel.org Hi, While working on mon/PGMonitor.cc I see that there is a lot of inconsistency on the code. A lot of whitespaces, indentation which is not correct, well, a lot of things. Is this something we want to fix? With some scripts we can probably do this easily, but it might cause merge hell with people working on features. Wido ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: CodingStyle on existing code 2015-12-01 13:10 CodingStyle on existing code Wido den Hollander @ 2015-12-01 13:47 ` Loic Dachary 2015-12-01 15:00 ` Gregory Farnum 0 siblings, 1 reply; 8+ messages in thread From: Loic Dachary @ 2015-12-01 13:47 UTC (permalink / raw) To: Wido den Hollander, ceph-devel@vger.kernel.org [-- Attachment #1: Type: text/plain, Size: 833 bytes --] On 01/12/2015 14:10, Wido den Hollander wrote: > Hi, > > While working on mon/PGMonitor.cc I see that there is a lot of > inconsistency on the code. > > A lot of whitespaces, indentation which is not correct, well, a lot of > things. > > Is this something we want to fix? With some scripts we can probably do > this easily, but it might cause merge hell with people working on features. A sane (but long) way to do that is to cleanup when fixing a bug or adding a feature. With (a lot) of patience, it will eventually be better :-) My 2cts. > Wido > -- > To unsubscribe from this list: send the line "unsubscribe ceph-devel" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > -- Loïc Dachary, Artisan Logiciel Libre [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 198 bytes --] ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: CodingStyle on existing code 2015-12-01 13:47 ` Loic Dachary @ 2015-12-01 15:00 ` Gregory Farnum 2015-12-01 15:16 ` Wido den Hollander 0 siblings, 1 reply; 8+ messages in thread From: Gregory Farnum @ 2015-12-01 15:00 UTC (permalink / raw) To: Loic Dachary; +Cc: Wido den Hollander, ceph-devel@vger.kernel.org On Tue, Dec 1, 2015 at 5:47 AM, Loic Dachary <loic@dachary.org> wrote: > > > On 01/12/2015 14:10, Wido den Hollander wrote: >> Hi, >> >> While working on mon/PGMonitor.cc I see that there is a lot of >> inconsistency on the code. >> >> A lot of whitespaces, indentation which is not correct, well, a lot of >> things. >> >> Is this something we want to fix? With some scripts we can probably do >> this easily, but it might cause merge hell with people working on features. > > A sane (but long) way to do that is to cleanup when fixing a bug or adding a feature. With (a lot) of patience, it will eventually be better :-) Yeah, we generally want you to follow the standards in any new code. A mass update of the code style on existing code makes navigating the history a little harder so a lot of people don't like it much, though. *shrug* -Greg ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: CodingStyle on existing code 2015-12-01 15:00 ` Gregory Farnum @ 2015-12-01 15:16 ` Wido den Hollander 2015-12-01 15:18 ` Sage Weil 0 siblings, 1 reply; 8+ messages in thread From: Wido den Hollander @ 2015-12-01 15:16 UTC (permalink / raw) To: Gregory Farnum, Loic Dachary; +Cc: ceph-devel@vger.kernel.org On 01-12-15 16:00, Gregory Farnum wrote: > On Tue, Dec 1, 2015 at 5:47 AM, Loic Dachary <loic@dachary.org> wrote: >> >> >> On 01/12/2015 14:10, Wido den Hollander wrote: >>> Hi, >>> >>> While working on mon/PGMonitor.cc I see that there is a lot of >>> inconsistency on the code. >>> >>> A lot of whitespaces, indentation which is not correct, well, a lot of >>> things. >>> >>> Is this something we want to fix? With some scripts we can probably do >>> this easily, but it might cause merge hell with people working on features. >> >> A sane (but long) way to do that is to cleanup when fixing a bug or adding a feature. With (a lot) of patience, it will eventually be better :-) > > Yeah, we generally want you to follow the standards in any new code. A > mass update of the code style on existing code makes navigating the > history a little harder so a lot of people don't like it much, though. Understood. But in this case I'm working in PGMonitor.cc. For just 20 lines of code I probably shouldn't refactor the whole file, should I? > *shrug* > -Greg > -- > To unsubscribe from this list: send the line "unsubscribe ceph-devel" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: CodingStyle on existing code 2015-12-01 15:16 ` Wido den Hollander @ 2015-12-01 15:18 ` Sage Weil 2015-12-03 11:12 ` Joao Eduardo Luis 0 siblings, 1 reply; 8+ messages in thread From: Sage Weil @ 2015-12-01 15:18 UTC (permalink / raw) To: Wido den Hollander Cc: Gregory Farnum, Loic Dachary, ceph-devel@vger.kernel.org On Tue, 1 Dec 2015, Wido den Hollander wrote: > > On 01-12-15 16:00, Gregory Farnum wrote: > > On Tue, Dec 1, 2015 at 5:47 AM, Loic Dachary <loic@dachary.org> wrote: > >> > >> > >> On 01/12/2015 14:10, Wido den Hollander wrote: > >>> Hi, > >>> > >>> While working on mon/PGMonitor.cc I see that there is a lot of > >>> inconsistency on the code. > >>> > >>> A lot of whitespaces, indentation which is not correct, well, a lot of > >>> things. > >>> > >>> Is this something we want to fix? With some scripts we can probably do > >>> this easily, but it might cause merge hell with people working on features. > >> > >> A sane (but long) way to do that is to cleanup when fixing a bug or adding a feature. With (a lot) of patience, it will eventually be better :-) > > > > Yeah, we generally want you to follow the standards in any new code. A > > mass update of the code style on existing code makes navigating the > > history a little harder so a lot of people don't like it much, though. > > Understood. But in this case I'm working in PGMonitor.cc. For just 20 > lines of code I probably shouldn't refactor the whole file, should I? Easiest thing is to fix the code around your change. I'm also open to a wholesale cleanup since it's a low-traffic file and likely won't conflict with other stuff in flight. But, up to you! sage ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: CodingStyle on existing code 2015-12-01 15:18 ` Sage Weil @ 2015-12-03 11:12 ` Joao Eduardo Luis 2015-12-09 23:16 ` Wido den Hollander 0 siblings, 1 reply; 8+ messages in thread From: Joao Eduardo Luis @ 2015-12-03 11:12 UTC (permalink / raw) To: Sage Weil, Wido den Hollander Cc: Gregory Farnum, Loic Dachary, ceph-devel@vger.kernel.org On 12/01/2015 03:18 PM, Sage Weil wrote: > On Tue, 1 Dec 2015, Wido den Hollander wrote: >> >> On 01-12-15 16:00, Gregory Farnum wrote: >>> On Tue, Dec 1, 2015 at 5:47 AM, Loic Dachary <loic@dachary.org> wrote: >>>> >>>> >>>> On 01/12/2015 14:10, Wido den Hollander wrote: >>>>> Hi, >>>>> >>>>> While working on mon/PGMonitor.cc I see that there is a lot of >>>>> inconsistency on the code. >>>>> >>>>> A lot of whitespaces, indentation which is not correct, well, a lot of >>>>> things. >>>>> >>>>> Is this something we want to fix? With some scripts we can probably do >>>>> this easily, but it might cause merge hell with people working on features. >>>> >>>> A sane (but long) way to do that is to cleanup when fixing a bug or adding a feature. With (a lot) of patience, it will eventually be better :-) >>> >>> Yeah, we generally want you to follow the standards in any new code. A >>> mass update of the code style on existing code makes navigating the >>> history a little harder so a lot of people don't like it much, though. >> >> Understood. But in this case I'm working in PGMonitor.cc. For just 20 >> lines of code I probably shouldn't refactor the whole file, should I? While it annoys me finding a given commit in history that just changes every single line to fix styling, I also recognize that this is the sort of janitorial task that may be warranted for certain files. As sage mentions below, this is a low-traffic file. And whenever it's changed, is often just tiny bits here and there. That tends to add to the style divergence rather than to convergence. I'd say go for it. If you are indeed changing those 20 or so lines though, please add those lines on a separate patch from the style changes. -Joao > > Easiest thing is to fix the code around your change. > > I'm also open to a wholesale cleanup since it's a low-traffic file and > likely won't conflict with other stuff in flight. But, up to you! > > sage > -- > To unsubscribe from this list: send the line "unsubscribe ceph-devel" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: CodingStyle on existing code 2015-12-03 11:12 ` Joao Eduardo Luis @ 2015-12-09 23:16 ` Wido den Hollander 2015-12-09 23:28 ` Joao Eduardo Luis 0 siblings, 1 reply; 8+ messages in thread From: Wido den Hollander @ 2015-12-09 23:16 UTC (permalink / raw) To: Joao Eduardo Luis, Sage Weil Cc: Gregory Farnum, Loic Dachary, ceph-devel@vger.kernel.org On 12/03/2015 12:12 PM, Joao Eduardo Luis wrote: > On 12/01/2015 03:18 PM, Sage Weil wrote: >> On Tue, 1 Dec 2015, Wido den Hollander wrote: >>> >>> On 01-12-15 16:00, Gregory Farnum wrote: >>>> On Tue, Dec 1, 2015 at 5:47 AM, Loic Dachary <loic@dachary.org> wrote: >>>>> >>>>> >>>>> On 01/12/2015 14:10, Wido den Hollander wrote: >>>>>> Hi, >>>>>> >>>>>> While working on mon/PGMonitor.cc I see that there is a lot of >>>>>> inconsistency on the code. >>>>>> >>>>>> A lot of whitespaces, indentation which is not correct, well, a lot of >>>>>> things. >>>>>> >>>>>> Is this something we want to fix? With some scripts we can probably do >>>>>> this easily, but it might cause merge hell with people working on features. >>>>> >>>>> A sane (but long) way to do that is to cleanup when fixing a bug or adding a feature. With (a lot) of patience, it will eventually be better :-) >>>> >>>> Yeah, we generally want you to follow the standards in any new code. A >>>> mass update of the code style on existing code makes navigating the >>>> history a little harder so a lot of people don't like it much, though. >>> >>> Understood. But in this case I'm working in PGMonitor.cc. For just 20 >>> lines of code I probably shouldn't refactor the whole file, should I? > > While it annoys me finding a given commit in history that just changes > every single line to fix styling, I also recognize that this is the sort > of janitorial task that may be warranted for certain files. > > As sage mentions below, this is a low-traffic file. And whenever it's > changed, is often just tiny bits here and there. That tends to add to > the style divergence rather than to convergence. > > I'd say go for it. If you are indeed changing those 20 or so lines > though, please add those lines on a separate patch from the style changes. > Here is the first pull request without a functional change. It is just the codingstyle fix: https://github.com/ceph/ceph/pull/6881 If that comes through I can put in the actual code. Wido > -Joao > >> >> Easiest thing is to fix the code around your change. >> >> I'm also open to a wholesale cleanup since it's a low-traffic file and >> likely won't conflict with other stuff in flight. But, up to you! >> >> sage >> -- >> To unsubscribe from this list: send the line "unsubscribe ceph-devel" in >> the body of a message to majordomo@vger.kernel.org >> More majordomo info at http://vger.kernel.org/majordomo-info.html >> > -- Wido den Hollander 42on B.V. Ceph trainer and consultant Phone: +31 (0)20 700 9902 Skype: contact42on ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: CodingStyle on existing code 2015-12-09 23:16 ` Wido den Hollander @ 2015-12-09 23:28 ` Joao Eduardo Luis 0 siblings, 0 replies; 8+ messages in thread From: Joao Eduardo Luis @ 2015-12-09 23:28 UTC (permalink / raw) To: Wido den Hollander, Sage Weil Cc: Gregory Farnum, Loic Dachary, ceph-devel@vger.kernel.org On 12/09/2015 11:16 PM, Wido den Hollander wrote: > On 12/03/2015 12:12 PM, Joao Eduardo Luis wrote: >> On 12/01/2015 03:18 PM, Sage Weil wrote: >>> On Tue, 1 Dec 2015, Wido den Hollander wrote: >>>> >>>> On 01-12-15 16:00, Gregory Farnum wrote: >>>>> On Tue, Dec 1, 2015 at 5:47 AM, Loic Dachary <loic@dachary.org> wrote: >>>>>> >>>>>> >>>>>> On 01/12/2015 14:10, Wido den Hollander wrote: >>>>>>> Hi, >>>>>>> >>>>>>> While working on mon/PGMonitor.cc I see that there is a lot of >>>>>>> inconsistency on the code. >>>>>>> >>>>>>> A lot of whitespaces, indentation which is not correct, well, a lot of >>>>>>> things. >>>>>>> >>>>>>> Is this something we want to fix? With some scripts we can probably do >>>>>>> this easily, but it might cause merge hell with people working on features. >>>>>> >>>>>> A sane (but long) way to do that is to cleanup when fixing a bug or adding a feature. With (a lot) of patience, it will eventually be better :-) >>>>> >>>>> Yeah, we generally want you to follow the standards in any new code. A >>>>> mass update of the code style on existing code makes navigating the >>>>> history a little harder so a lot of people don't like it much, though. >>>> >>>> Understood. But in this case I'm working in PGMonitor.cc. For just 20 >>>> lines of code I probably shouldn't refactor the whole file, should I? >> >> While it annoys me finding a given commit in history that just changes >> every single line to fix styling, I also recognize that this is the sort >> of janitorial task that may be warranted for certain files. >> >> As sage mentions below, this is a low-traffic file. And whenever it's >> changed, is often just tiny bits here and there. That tends to add to >> the style divergence rather than to convergence. >> >> I'd say go for it. If you are indeed changing those 20 or so lines >> though, please add those lines on a separate patch from the style changes. >> > > Here is the first pull request without a functional change. It is just > the codingstyle fix: https://github.com/ceph/ceph/pull/6881 > > If that comes through I can put in the actual code. Seems a whole lot less intrusive than I expected. :) -Joao > > Wido > >> -Joao >> >>> >>> Easiest thing is to fix the code around your change. >>> >>> I'm also open to a wholesale cleanup since it's a low-traffic file and >>> likely won't conflict with other stuff in flight. But, up to you! >>> >>> sage >>> -- >>> To unsubscribe from this list: send the line "unsubscribe ceph-devel" in >>> the body of a message to majordomo@vger.kernel.org >>> More majordomo info at http://vger.kernel.org/majordomo-info.html >>> >> > > ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2015-12-09 23:28 UTC | newest] Thread overview: 8+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2015-12-01 13:10 CodingStyle on existing code Wido den Hollander 2015-12-01 13:47 ` Loic Dachary 2015-12-01 15:00 ` Gregory Farnum 2015-12-01 15:16 ` Wido den Hollander 2015-12-01 15:18 ` Sage Weil 2015-12-03 11:12 ` Joao Eduardo Luis 2015-12-09 23:16 ` Wido den Hollander 2015-12-09 23:28 ` Joao Eduardo Luis
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.