[petsc-dev] Fine-grained style checker script ready

Matthew Knepley knepley at gmail.com
Tue Mar 5 16:35:58 CST 2013


On Tue, Mar 5, 2013 at 5:31 PM, Karl Rupp <rupp at mcs.anl.gov> wrote:

> Hi again,
>
> the script for checking modified/added files based on `hg status` is now
> in place:
>  src/contrib/style/**hgstylecheck.sh
>
> What is the best way to integrate it into make? I thought about something
> like
>  $> make stylecheck
> but this is somewhat misleading since it only checks modified/added files,
> not the full source tree. The alternative
>  $> make stylecheckdiff
> is probably too lengthy. Maybe
>

How about

   make std

:). What about making it a pre-commit hook?

    Matt


>  $> make stylediff
> ? Other suggestions?
>
> Best regards,
> Karli
>
>
>
> On 03/05/2013 03:45 PM, Karl Rupp wrote:
>
>> Dear PETScians,
>>
>> it is now possible to obtain a style violation summary on a per-file
>> basis. The script is
>>    ${PETSC_DIR}/src/contrib/**style/stylecheck.sh
>> and runs all stable^1 checks on the provided subfolder(s) or files(s).
>>
>> Examples:
>>
>> - Report all violations in src/ts:
>> $:petsc-dev> src/contrib/style/stylecheck.**sh src/ts
>>
>> - Report all violations in power_grid/ex8.c:
>> $:petsc-dev> src/contrib/style/stylecheck.**sh \
>>    src/ts/examples/tutorials/**power_grid/ex8.c
>>
>> I'm currently trying to fuse the script with `hg status` so that one can
>> conveniently run it on all new or modified files. Please let me know of
>> any issues you encounter.
>>
>> Best regards,
>> Karli
>>
>> ^1 A stable check is a check that causes less than ~100 complaints over
>> all of src/, see http://krupp.iue.tuwien.ac.at/**petsc-style/<http://krupp.iue.tuwien.ac.at/petsc-style/>
>>
>
>


-- 
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20130305/a1261897/attachment.html>


More information about the petsc-dev mailing list