Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/delphinus/p5-app-efm_perl
Tiny script to lint your codes and print messages in errorformat
https://github.com/delphinus/p5-app-efm_perl
errorformat perl perl5
Last synced: about 2 months ago
JSON representation
Tiny script to lint your codes and print messages in errorformat
- Host: GitHub
- URL: https://github.com/delphinus/p5-app-efm_perl
- Owner: delphinus
- License: mit
- Created: 2021-07-25T00:33:03.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-07-27T04:29:05.000Z (over 1 year ago)
- Last Synced: 2024-11-18T20:14:51.925Z (about 2 months ago)
- Topics: errorformat, perl, perl5
- Language: Perl
- Homepage: https://metacpan.org/dist/App-efm_perl/view/script/efm-perl
- Size: 45.9 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: Changes
- License: LICENSE
Awesome Lists containing this project
README
[![Actions Status](https://github.com/delphinus/p5-App-efm_perl/workflows/test/badge.svg)](https://github.com/delphinus/p5-App-efm_perl/actions)
# NAMEefm-perl - perl -c executable with errorformat friendly outputs.
# SYNOPSIS
# 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# OPTIONS
- **--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.
# DESCRIPTION
This is a tiny script to use with
[mattn/efm-langserver](https://github.com/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-perlefm-perl borrows many ideas from the original
[efm\_perl.pl](https://github.com/vim-perl/vim-perl/blob/dev/tools/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](https://github.com/tokuhirom/plenv) and
[direnv](https://github.com/direnv/direnv), and lint with the desired Perl
version and enviromental variables.# USAGE
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
# LICENSE
Copyright (C) delphinus.
This library is free software; you can redistribute it and/or modify it under
MIT License.# AUTHOR
delphinus