Skip to main content
Skip to main content

How to Lint your scripts

In this document, you’ll learn about the best practices for linting your scripts.

Introduction

Linting is the process of checking your scripts for errors and potential problems. It helps you to ensure that your scripts are consistent, readable, and maintainable.

There are different tools for linting bash scripts. The most popular is shellcheck.

Note

At one point, we plan to extend shellcheck with a custom set of rules that are specific to argsh styleguide.

VSCode Integration

You can integrate shellcheck into VSCode by installing the shellcheck extension.

Use shellcheck with argsh

Argsh provides a wrapper for shellcheck that you can use in your projects. If you installed argsh as executable, you can use it like this:

argsh lint scripts/*.sh hack/*.sh other-folder

Use argsh lint --help to get more information about the available options.

Was this section helpful?