Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(76)

Issue 8630045: Add --root flag used for deriving header guard CPP variable.

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 7 months ago by mazda
Modified:
11 years, 6 months ago
Reviewers:
erg
CC:
Mark Mentovai
Base URL:
http://google-styleguide.googlecode.com/svn/trunk/
Visibility:
Public.

Description

Add --root flag used for deriving header guard CPP variable. By default, the header guard CPP variable is calculated as the relative path to the directory that contains .git, .hg, or .svn. When this flag is specified, the relative path is calculated from the specified directory.

Patch Set 1 #

Patch Set 2 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+53 lines, -2 lines) Patch
M cpplint/cpplint.py View 5 chunks +29 lines, -2 lines 0 comments Download
A cpplint/cpplint_test_header.h View 1 chunk +1 line, -0 lines 0 comments Download
M cpplint/cpplint_unittest.py View 1 1 chunk +23 lines, -0 lines 0 comments Download

Messages

Total messages: 7
mazda
Hello Elliot, Could you review this CL?
11 years, 7 months ago (2013-04-12 07:02:10 UTC) #1
erg
I patched this in to my local client, and the unit tests don't pass. ====================================================================== ...
11 years, 6 months ago (2013-04-12 19:17:52 UTC) #2
mazda
Does your local client have .svn directory? The new test verifies the behavior of a ...
11 years, 6 months ago (2013-04-15 04:39:53 UTC) #3
erg
On 2013/04/15 04:39:53, mazda wrote: > Does your local client have .svn directory? > The ...
11 years, 6 months ago (2013-04-15 17:34:48 UTC) #4
mazda
On 2013/04/15 17:34:48, erg wrote: > On 2013/04/15 04:39:53, mazda wrote: > > Does your ...
11 years, 6 months ago (2013-04-16 09:24:56 UTC) #5
erg
On 2013/04/16 09:24:56, mazda wrote: > On 2013/04/15 17:34:48, erg wrote: > > On 2013/04/15 ...
11 years, 6 months ago (2013-04-16 21:05:59 UTC) #6
erg
11 years, 6 months ago (2013-04-16 21:07:24 UTC) #7
On 2013/04/16 21:05:59, erg wrote:
> On 2013/04/16 09:24:56, mazda wrote:
> > On 2013/04/15 17:34:48, erg wrote:
> > > On 2013/04/15 04:39:53, mazda wrote:
> > > > Does your local client have .svn directory?
> > > > The new test verifies the behavior of a function that relies on the
> > existence
> > > of
> > > > .svn directory, so it will fail without .svn directory.
> > > > Should I avoid this assumption?
> > > 
> > > There is an .svn directory in the cpplint folder, but some people do check
> > this
> > > out w/ git-svn, so I don't think you should make that assumption.
> > > 
> > > Also, it looks like it works if the unittests are run from the top of the
> > > repository. I'd like to see that made more robust.
> > 
> > Thank you for the comments.
> > I fixed the tests to work when it runs from the directories other than top
of
> > the repository.
> > FileInfo.RepositoryName in cpplint.py checks the existence of .svn, .git, or
> .hg
> > to determine the top directory of the repository, so git-svn is OK as well.
> 'svn
> > export' and 'git archive' are problematic cases. I modified the test at
least
> > not to fail in such cases (just skip the test).
> > Please take another look.
> 
> lgtm. I'll commit this. Thanks.

https://code.google.com/p/google-styleguide/source/detail?r=103
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b