efm-perl - perl -c executable with errorformat friendly outputs.
# load the script from -f option
efm-perl -f /path/to/script.pl
# load the script from STDIN but filter out messages by filename from -f option
cat /tmp/script.pl | efm-perl -f /path/to/script.pl
-
--lib, -I
Additional paths for
$PERL5LIB
-
--filename, -f
Filename to lint. This is mandatory.
-
--verbose, -v
Print out all outputs. Without this, it shows errors only.
-
--help, -h
Print a help message.
-
--version
Show the version string.
This is a tiny script to use with
mattn/efm-langserver. It parses
perl -c
outputs and arrange them to errorformat-friendly ones.
For efm-langserver, set config.yaml as below.
tools:
efm-perl: &efm-perl
lint-command: efm-perl -f ${INPUT}
lint-ignore-exit-code: true
lint-stdin: true
lint-formats:
- '%l:%m'
languages:
perl:
- <<: *efm-perl
efm-perl borrows many ideas from the original efm_perl.pl. This has improvements below after that.
-
efm-perl can read STDIN.
efm_perl.pl
can only read the supplied filename. efm-perl can parse from STDIN to lint codes on your text editor without saving to disk. -
efm-perl can deal with plenv & direnv.
It detects the filename and chdir to Git root automatically. Then it setups plenv and direnv, and lint with the desired Perl version and enviromental variables.
You can install efm-perl
with cpanm
.
cpanm install App::efm_perl
Or you can use simply by copying the script.
cp script/efm-perl /path/to/your/$PATH
Copyright (C) delphinus.
This library is free software; you can redistribute it and/or modify it under MIT License.
delphinus me@delphinus.dev