----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/21360/#review42911 -----------------------------------------------------------
Sorry for not being clear. I think the script should by default look at the whole source tree. Only when a list of files is given as cmd args should it restrict it to those files (with filtering). Much like how git commands work (e.g., 'git diff' applies to whole repo, whereas 'git diff -- src/' applies to only source directory). I agree that it might be weird if someone specifies a file in cmd arg and we filter it based on our filtering rules (3rd party, generated etc) but I think that's fine for now and should work with our current use cases (review bot, users doing it manually, git commit hook). We could, in the future, add an option (--force or something) that could override the default filtering rules too if someone needs it. - Vinod Kone On May 13, 2014, 9:56 p.m., Steven Phung wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/21360/ > ----------------------------------------------------------- > > (Updated May 13, 2014, 9:56 p.m.) > > > Review request for mesos and Vinod Kone. > > > Bugs: MESOS-1349 > https://issues.apache.org/jira/browse/MESOS-1349 > > > Repository: mesos-git > > > Description > ------- > > Previously run_lint was being invoked a large subset of the source tree which > was inefficient. With this change it enables mesos-style.py to potentially be > used as a pre-commit hook. > > git diff is used to determine which staged files that have been added or > removed. The intersection between the staged files and all lint candidates > is computed and sent to cpplint. The return value of the mesos-style.py > script is the result of the cpplint process exit or 0 if there the > intersection is empty. > > > Diffs > ----- > > support/mesos-style.py bd7dcdb > > Diff: https://reviews.apache.org/r/21360/diff/ > > > Testing > ------- > > ./support/mesos-style.py > > > Thanks, > > Steven Phung > >
