SC1095 – ShellCheck Wiki

See this page on GitHub


You need a space or linefeed between the function name and body.

Problematic code:

function foo{
  echo "hello world"

Correct code:

Prefer POSIX syntax:

foo() {
  echo "hello world"

Alternatively, add the missing space between function name and opening {:

#           v-- Here
function foo {
  echo "hello world"


When using function keyword function definitions without (), a space is required between the function name and the opening {.



ShellCheck is a static analysis tool for shell scripts. This page is part of its documentation.