[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Tests to assure debug remnants are not in our sources?

On Mon, Sep 14, 2015 at 04:05:53PM +0200, Erik Huelsmann wrote:

> Perl::Critic in our standard test suite now:

> 1. No hard tabs
> 2. No trailing whitespace

Why wade through messages?  Just use perltidy and be done.

> 3. No "evil" modules (Data::Dumper, Carp::Always)
> 4. Require 'use strict' and 'use warnings'

> Unfortunately, I haven't found a policy which checks for 'print STDERR'...

I would have to brush up on how to write such.  

In my boilerplate, I use:

my $DEBUG = 1;
sub dsay { print( STDERR @_ , $/) if $DEBUG }

dsay( "In code" );

Get rid of sub dsay or $DEBUG and the rest warn or fail.
I can get into the perlcritic, if folks like.

Any linting process can be obnoxious to start, I would start
by aiming to enforce the coding quality you have, moving from
there to better* slowly.  (What is better depends on the Perl 
programming abilities we have and want to attract.) Trying to 
avoid any flood of errors.


Ledger-smb-devel mailing list