<div dir="ltr"><div>That's awesome! One brief note is that the fortran stubs generator doesn't acquiesce to social shaming and as such its output should probably be ignored. :)<br><br></div>- Peter<br></div><div class="gmail_extra">
<br><br><div class="gmail_quote">On Thu, Jan 17, 2013 at 4:05 PM, Karl Rupp <span dir="ltr"><<a href="mailto:rupp@mcs.anl.gov" target="_blank">rupp@mcs.anl.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello again,<br>
<br>
I've set up a couple of scripts checking for compliance with the coding styles and started with the removal of tabs. There's also a little page set up for tracking the current progress (i.e. the work left to be done):<br>
<a href="http://krupp.iue.tuwien.ac.at/petsc-style/" target="_blank">http://krupp.iue.tuwien.ac.at/<u></u>petsc-style/</a><br>
The page is automatically generated from a bash script calling the various checker scripts and may be run nightly via a cron job. Further details on the violations can be found when clicking on the number of violations found. My goal is to reach 'all green' within the next couple of days and then to integrate the 'most failsafe' scripts into Mercurial.<br>
<br>
I'm also thinking about a similar simple overview page for the nightly tests, but that's a different story...<br>
<br>
Best regards,<br>
Karli<div class="HOEnZb"><div class="h5"><br>
<br>
<br>
<br>
On 01/15/2013 02:47 PM, Barry Smith wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
On Jan 15, 2013, at 2:42 PM, Karl Rupp <<a href="mailto:rupp@mcs.anl.gov" target="_blank">rupp@mcs.anl.gov</a>> wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Dear all,<br>
<br>
quoting a recent commit:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
BarryFSmith committed 16 hours ago (raw commit)<br>
<br>
silly code formatting problems; some people still need to read the<br>
style guide<br>
</blockquote>
<br>
So we have a style guide that is partially respected, partially ignored. Some things are pretty hard to check automatically, while others are rather simple. So let's pick<br>
"No tabs are allowed in any of the source code."<br>
as an example and run<br>
<br>
$petsc-dev/src> find . -name *.h -type f | xargs grep -P '\t' | wc -l<br>
<br>
to pick the number of violations in .h-files. I get 3215 hits, which is still small compared to the 8797 hits in .c-files.<br>
</blockquote>
<br>
It takes little more time to fix the problem then detect it :-)<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
So, what can we do to reduce the number of violations of the style guide and keep the number of violations as small as possible in the future?<br>
<br>
- First and foremost, eliminate (as many of the) existing violations (as possible) and come to a clean state.<br>
</blockquote>
<br>
Yes<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
- Run pre-push-scripts on bitbucket on the diff. They may not find all violations, but at least check for the most obvious ones.<br>
</blockquote>
<br>
Yes. Jed is too in love with Git to ever do this so you have to.<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
- Add nightly tests on the source tree. We can compare the output of a properly configured uncrustify against the existing source files and complain on a mismatch.<br>
</blockquote>
<br>
The problem is that uncrustify is exactly the PETSc style so we can't do that comparison automatically. Otherwise we would just run uncrustify on all pushes.<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Unless there are objections, I'm willing to devote some time on that while playing with options for a better testing environment. I don't think that a full elimination of all violations is ever possible nor reasonably attainable. However, a reduction of violations simplifies the handling of the code base considerably and is thus worth the effort.<br>
</blockquote>
<br>
Yes<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Best regards,<br>
Karli<br>
<br>
</blockquote>
<br>
</blockquote>
<br>
</div></div></blockquote></div><br></div>