Git Product home page Git Product logo

shellcheck-linter's Introduction

Linter for shellcheck

ShellCheck is a comprehensive linter for shell scripts to highlight syntax issues, seantic problems and more subtle caveats, to avoid scripts to behave counter-intuitively or stop to work in some odd conditions.

For more information about ShellCheck, see http://www.shellcheck.net/

REQUIREMENTS

This library requires Arcanist and ShellCheck installed.

INSTALLATION

Clone this repository or deploy to the same folder where you've arcanist and libphutil. For example if they live in /opt/phabricator you should deploy this as /opt/phabricator/shellcheck-linter.

USE

  1. Add to your .arcconfig the requirements to load the extra library:
  "load": [
    "shellcheck-linter"                                                                                                                                
  ]

Replace the absolute value by a relative path to the folder if you aren't able to install globally as instructed above:

  "load": [                                                                                                                                            
    "./vendor/shellcheck-linter"                                                                                                                                
  ]                                                                                                                                                    
  1. Configure .arclint to lint shell:
{
    "linters": {
        "shell": {
            "type": "shellcheck",
            "include": [
                "(\\.sh$)"
            ]
        }
    }
}

OPTIONS

Please see arc linters shellcheck for the list of options supported by this linter.

TIPS

As Arcanist currently doesn't detect file formats or doesn't parse shebangs, you can find useful to enforce a convention scripts MUST be appended by an extension like .py .sh in your repository. This may be more convenient for other CI tasks too.

That doesn't mean you have to install them with the extension, both cp and install commands are happy to accept an arbitray filename as target, including a target without the extension.

CREDITS

  • Joshua Spence: linter development
  • Sébastien Santoro: library packaging, maintainer

LICENSE

This linter for Arcanist is released under the Apache 2.0 license.

shellcheck-linter's People

Contributors

dereckson avatar derekargueta avatar

Watchers

James Cloos avatar  avatar

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.