Coder Social home page Coder Social logo

app-perlminlint's People

Contributors

hkoba avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

app-perlminlint's Issues

Use `perl -Mstrict` by default

T/O.

Ideally, If the source tested by perlminlint lacks "use strict", I prefer notifying it directly. But there is no easy way to detect whether given perl code is written using use strict because it can be turned on from other modules. And we should write use strict clean code today anyway.

Correct docs about LintPM case.

In docs for *.pm lint case, I wrote

% perlminlint  MyModule.pm
#  => This tests "perl -MMyModule -we0"

but actually I've done:

perl -we 'require MyModule'

Add --no_force_warnings

Currently, perlminlint tests all scripts with -w option. Unfortunately, there are some modules on CPAN which are useful, widely used but not perl -w clean. So, let's add an option to override this behavior and allow testing scripts without -w.


For example, perlminlint reports an error about Template::Mustache::Parser for the following script
at least for now.

package Foo;
use strict;
use warnings;

use Template::Mustache;
1;

Here is the error.

False [] range "/-\w" in regex; marked by <-- HERE in m/\A(?:[/-\w <-- HERE .]+)/
 at /home/hkoba//tmp/minlinttest/local/lib/perl5/Template/Mustache/Parser.pm line 2969.

You can avoid the above by adding no_force_warnings: 1 to your .perlminlint.yml in your project root (or somewhere surrounding) directory.

% echo no_force_warnings: 1  >> .perlminlint.yml

Use `perl -C` by default

To avoid errors like Wide character in private variable which is generated from code like below:

use utf8;
use strict;
use fields qw/お名前 職業 年齢/;

sub MY () {__PACKAGE__}

my MY $hash = +{};

print $hash->{お名前え};  # ←←← HERE

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.