hkoba / app-perlminlint Goto Github PK
View Code? Open in Web Editor NEWperlminlint - smart "perl -wc" wrapper
perlminlint - smart "perl -wc" wrapper
Should port hkoba/yatt_lite#143
T/O.
T/O.
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.
Many perl projects uses lib
for module directory, so this can be automatically detected.
T/O
https://rt.cpan.org/Ticket/Display.html?id=99917
(Thank you SREZIC for telling me about this issue. I will fix it today).
T/O. Related to #15
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'
Related to [GH #2].
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
T/O
There should be a warning about this.
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
T/O.
To be happy with Carton.
Nice to have.
Current perlminlint dies with encoding error for non-utf8 modules. Fix it!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.