Skip to content

Conversation

@rjmunro
Copy link
Contributor

@rjmunro rjmunro commented Feb 24, 2017

The sed format outputs sed commands that should fix some of the errors. Note that this requires gnu sed. If that is installed as gsed on your system (common e.g. on macOS with homebrew) you can use the gsed output format.

Sed commands are written to stdout, not stderr, so you should be able to pipe output straight to a shell to run the fixes, e.g.

cpplint --output sed file.cpp | bash

Currently doesn't apply fixes that cause line numbers below to change. I plan to reverse the order of the output by storing it in the _junit_errors array, then reversing on print, so that line numbers are only changed for lines lower in the file which would have already been fixed.

This was written on a different fork of cpplint that followed different coding standards, and I have attempted to merge only the relevant parts in. I'm submitting this PR to get feedback on whether it is likely to be accepted and if I am doing things in the best way.

The sed format outputs sed commands that should fix some of the errors.
Note that this requires gnu sed. If that is installed as gsed on your
system (common e.g. on macOS with homebrew) you can use the gsed output
format. Sed commands are written to stdout, not stderr, so you should be
able to pipe output straight to a shell to run the fixes.
@tkruse
Copy link
Contributor

tkruse commented Feb 14, 2019

Code looks reasonable to me. Rebasing and adding unit test would be good before merge.

@tkruse
Copy link
Contributor

tkruse commented Feb 17, 2019

closing in favor of updated #83

@tkruse tkruse closed this Feb 17, 2019
@tkruse
Copy link
Contributor

tkruse commented Jun 24, 2020

Finally released in 1.5.2

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.

2 participants