Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add documentation, fix indentation, add tox.ini #52

Closed
wants to merge 2 commits into from

Conversation

tkruse
Copy link

@tkruse tkruse commented Oct 28, 2018

No description provided.

This was referenced Oct 28, 2018
@tkruse tkruse changed the base branch from fix-ci to master October 29, 2018 13:01
@tkruse
Copy link
Author

tkruse commented Oct 29, 2018

Rebased, also added the steps to fetch open PRs from upstream (though many will be unrelated to cpplint). Still someone should go through those of the last 2 years to see if we can merge something else that's peding on upstream (if it's useful).

@tkruse tkruse force-pushed the fix-ci branch 2 times, most recently from 81fffb3 to 2d2c5b5 Compare October 30, 2018 09:57
Using cpplint.py --root with directories at a more outer level
will now prepend the header guard with all the directories from the
root to the file.

For example given

  ls /a/b/c # /a/b/c/.git /a/b/c/filename.h
  cpplint.py --root=/a/b /a/b/c/filename.h   # C_FILENAME_H_

  # no root behavior:
  cpplint.py /a/b/c/filename.h               # FILENAME_H_

Also supports relative paths:

  cd /a/b/c
  cpplint.py --root=.. filename.h            # C_FILENAME_H_

Note that the old usage is still supported:

  cd /a/b/c
  mkdir -p d/e/f
  touch /a/b/c/d/e/f/filename.h
  cpplint.py --root=d/e/f d/e/f/filename.h   # FILENAME_H_

which would "strip" the prefix rather than prepend an extra prefix.

(Invalid root prefixes are as before also ignored)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant