> On March 11, 2014, 6:10 p.m., Bernd Mathiske wrote: > > How about adding a patch file to be applied (by the build process) to the > > original ccplint.py as opposed to making inline changes in it? This way we > > can integrated new versions of cpplint.py and still keep our changes vs. > > their changes apart with more ease. For reference, this approach has > > already been exercised in case of > > ./3rdparty/leveldb.patch > > ./3rdparty/libprocess/3rdparty/glog-0.3.3.patch > > ./3rdparty/libprocess/3rdparty/libev-4.15.patch > > ./m4/python.m4.patch > > > > Not sure where the patch-treated cpplint.py should show up. Maybe somewhere > > in ./build/3rdparty/? > > > > Niklas Nielsen wrote: > +1, try to take a look in 3rdparty/Makefile.am:54-60 :)
The stamp/patch target in 3rdparty/Makefile.am (and 3rdparty/libprocess/3rdparty/Makefile.am) applies specifically to unzipping, patching, and building tar.gz files for 3rdparty projects, so it makes sense to handle the patching in the Makefile for these cases. m4/python.m4, however, is just a script/macro, so it needs no make/build process itself. As such, the python.m4.patch that sits alongside python.m4 is already applied to python.m4 in the repo, and the patch sits alongside it to be applied manually after any updates to python.m4. Since cpplint.py is also just a script, it should not require a make for the patch changes to be applied. A user/dev should be able to clone the mesos git repo and immediately run cpplint.py/mesos-style.py without running 'make' first. Hence, I am following the python.m4 model and checking in the patched version of cpplint.py along with the patch alongside it for reference. - Adam ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/19060/#review36883 ----------------------------------------------------------- On March 14, 2014, 3:14 p.m., Adam B wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/19060/ > ----------------------------------------------------------- > > (Updated March 14, 2014, 3:14 p.m.) > > > Review request for mesos, Bernd Mathiske, Ben Mahler, and Niklas Nielsen. > > > Bugs: MESOS-1080 > https://issues.apache.org/jira/browse/MESOS-1080 > > > Repository: mesos-git > > > Description > ------- > > Updated cpplint.py from > https://google-styleguide.googlecode.com/svn/trunk/cpplint/cpplint.py and > added hpp files as valid extensions. > > > Diffs > ----- > > support/cpplint.patch PRE-CREATION > support/cpplint.py a8c9f67 > > Diff: https://reviews.apache.org/r/19060/diff/ > > > Testing > ------- > > Ran cpplint.py with all rules enabled on some of my recent changes; found > style errors in hpp headers. > Ran mesos-style.py on all of mesos source. Found tabs in some > libprocess/stout headers. > > > Thanks, > > Adam B > >
