<div dir="ltr">On Tue, Mar 5, 2013 at 5:31 PM, Karl Rupp <span dir="ltr"><<a href="mailto:rupp@mcs.anl.gov" target="_blank">rupp@mcs.anl.gov</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi again,<br>
<br>
the script for checking modified/added files based on `hg status` is now in place:<br>
 src/contrib/style/<u></u>hgstylecheck.sh<br>
<br>
What is the best way to integrate it into make? I thought about something like<br>
 $> make stylecheck<br>
but this is somewhat misleading since it only checks modified/added files, not the full source tree. The alternative<br>
 $> make stylecheckdiff<br>
is probably too lengthy. Maybe<br></blockquote><div><br></div><div style>How about</div><div style><br></div><div style>   make std</div><div style><br></div><div style>:). What about making it a pre-commit hook?<br></div>
<div style><br></div><div style>    Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
 $> make stylediff<br>
? Other suggestions?<br>
<br>
Best regards,<br>
Karli<div class="HOEnZb"><div class="h5"><br>
<br>
<br>
On 03/05/2013 03:45 PM, Karl Rupp wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Dear PETScians,<br>
<br>
it is now possible to obtain a style violation summary on a per-file<br>
basis. The script is<br>
   ${PETSC_DIR}/src/contrib/<u></u>style/stylecheck.sh<br>
and runs all stable^1 checks on the provided subfolder(s) or files(s).<br>
<br>
Examples:<br>
<br>
- Report all violations in src/ts:<br>
$:petsc-dev> src/contrib/style/stylecheck.<u></u>sh src/ts<br>
<br>
- Report all violations in power_grid/ex8.c:<br>
$:petsc-dev> src/contrib/style/stylecheck.<u></u>sh \<br>
   src/ts/examples/tutorials/<u></u>power_grid/ex8.c<br>
<br>
I'm currently trying to fuse the script with `hg status` so that one can<br>
conveniently run it on all new or modified files. Please let me know of<br>
any issues you encounter.<br>
<br>
Best regards,<br>
Karli<br>
<br>
^1 A stable check is a check that causes less than ~100 complaints over<br>
all of src/, see <a href="http://krupp.iue.tuwien.ac.at/petsc-style/" target="_blank">http://krupp.iue.tuwien.ac.at/<u></u>petsc-style/</a><br>
</blockquote>
<br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>
-- Norbert Wiener
</div></div>