slick

package module
v0.0.21 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 25, 2026 License: 0BSD Imports: 0 Imported by: 0

README

slick: a CI-ready shell language syntax checker

go.dev reference Test license

squirtle squad

SUMMARY

slick provides a reliable syntax checker for pure POSIX sh scripts, as sh itself is often aliased with superset languages from ash to zsh.

EXAMPLES

% slick -n examples; echo "$?"
2017/09/14 17:46:09 examples/apples.bash:2:8: arrays are a bash feature
2017/09/14 17:46:09 examples/hello.sh:2:6: reached EOF without closing quote '
1

% slick -help
  -help
        Show usage information
  -n    Validate syntax
  -version
        Show version information

ABOUT

slick provides an alternative to sh -n, which is problematic for a number of minor reasons:

  • sh is hardly ever a bare bones POSIX sh interpreter on most UNIX systems, but usually soft linked to bash, ksh, ash, or even stranger things. So anyone genuinely interested in vetting their #!/bin/sh scripts for compliance risks getting false negative scans for scripts that actually contain bashisms, kshisms, and so on. By contrast, slick guarantees pure POSIX parsing, so that scripts are scanned consistently regardless of the particular environment configuration.
  • sh is difficult to obtain in Windows. Cygwin-like environments are themselves difficult to setup. Should a unix, Linux, Windows, or other system desire syntax checking, slick is easy to obtain by gox ports, or through the wonderfully cross-platform Go toolchain.

DOWNLOAD

go install github.com/mcandre/slick/cmd/slick@latest

Prerequisites

Postinstall

Register output of go env GOBIN to PATH environment variable.

For details on building from source, see development.

RESOURCES

Prior art and personal plugs.

🌀

Documentation

Overview

Package slick wraps mvdan/sh POSIX sh syntax validation to create a CLI validation tool.

Index

Constants

View Source
const Version = "0.0.21"

Version is semver.

Variables

This section is empty.

Functions

This section is empty.

Types

This section is empty.

Directories

Path Synopsis
cmd
slick command
Package main implements a POSIX sh syntax validation CLI application.
Package main implements a POSIX sh syntax validation CLI application.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL