Giter Club home page Giter Club logo

syntax-check-perl's Introduction

Perl syntax checker

This is a Perl syntax checker, especially for ale.

Integrate with vim-plug and ale

Here is how to integrate with vim-plug and ale.

call plug#begin('~/.vim/plugged')
Plug 'dense-analysis/ale'
Plug 'skaji/syntax-check-perl'
call plug#end()

let g:ale_linters = { 'perl': ['syntax-check'] }

Configuration

If you write Perl a lot, then I assume you have your own favorite for how to check Perl code. You can set config file for syntax-check:

let g:ale_perl_syntax_check_config = expand('~/.vim/your-config.pl')

" there is also my favorite, and you can use it:)
let g:ale_perl_syntax_check_config = g:plug_home . '/syntax-check-perl/config/relax.pl'

" add arbitrary perl executable names. defaults to "perl"
let g:ale_perl_syntax_check_executable = 'my-perl'

The config files are written in Perl, so you can do whatever you want. :) See default.pl.

Adding libs to @INC

By default we try to add lib (or blib if appropriate), t/lib, xt/lib and local/lib/perl5 to @INC when attempting to compile your code. Depending on how you work, this may not be what you want. The good news is that you can manage this via the Perl config file. See also default.pl for more detailed information on how to do this.

Security

You should be aware that we use the -c flag to see if perl code compiles. This does not execute all of the code in a file, but it does run BEGIN and CHECK blocks. See perl --help and StackOverflow.

Debugging

You can use :ALEInfo in vim to troubleshoot Ale plugins. Scroll to the bottom of the :ALEInfo output to find any errors which may have been produced by this plugin.

Author

Shoichi Kaji

License

The same as perl

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.