alibaba/java-dns-cache-manipulator

View on GitHub
mvnw

Summary

Maintainability
Test Coverage

Can't follow non-constant source. Use a directive to specify location.
Open

    . "$HOME/.mavenrc"
Severity: Minor
Found in mvnw by shellcheck

Can't follow non-constant source. Use a directive to specify location.

Problematic code:

. "$(find_install_dir)/lib.sh"

Correct code:

# shellcheck source=src/lib.sh
. "$(find_install_dir)/lib.sh"

Rationale:

ShellCheck is not able to include sourced files from paths that are determined at runtime. The file will not be read, potentially resulting in warnings about unassigned variables and similar.

Use a [[Directive]] to point shellcheck to a fixed location it can read instead.

Exceptions:

If you don't care that ShellCheck is unable to account for the file, specify # shellcheck source=/dev/null.

Notice

Original content from the ShellCheck https://github.com/koalaman/shellcheck/wiki.

This directive is unknown. It will be ignored.
Open

# shellcheck disable=SC2086 # safe args
Severity: Minor
Found in mvnw by shellcheck

This directive is unknown. It will be ignored.

Problematic code:

# shellcheck foobar=baz
echo "Hello World"

Correct code:

Depends on your intention.

Rationale:

ShellCheck doesn't recognize the [[directive]] you're trying to use in a # shellcheck comment. See the [[Directive]]s page for supported directives.

It could be misspelled, or you could be using an older version of shellcheck that doesn't support it yet.

Exceptions:

None. If you wish to ignore this warning and continue without it, you need version 0.4.5 (commit 88c56ec) or later and a command grouping:

# Ignore an unrecognized directive in 0.4.5 or later:
# shellcheck disable=SC1107
{
  # shellcheck unrecognized=directive
  echo "Hello World"
}

Before 0.4.5, unrecognized directives are considered parse errors.

Notice

Original content from the ShellCheck https://github.com/koalaman/shellcheck/wiki.

This \u will be a regular 'u' in this context.
Open

    JAVACMD="$(\unset -f command 2>/dev/null; \command -v java)"
Severity: Minor
Found in mvnw by shellcheck

This \o will be a regular 'o' in this context.

Problematic code:

# Want literal backslash
echo Yay \o/

# Want linefeed
greeting=Hello\nWorld

# Want other characters
carriagereturn=\r

Correct code:

echo 'Yay \o/'

greeting='Hello
World'

carriagereturn=$(printf '\r')

Rationale:

You have escaped something that has no special meaning when escaped. The backslash will be simply be ignored.

If the backslash was supposed to be literal, single quote or escape it.

If you wanted it to expand to something, rewrite the expression. For linefeeds (\n), put them literally in quotes. For other characters, use POSIX printf or bash/ksh $'...'.

Exceptions

None. ShellCheck (as of 2017-07-03, commit 31bb02d6) will not warn when the first letter of a command is unnecessarily escaped, as this is frequently used to suppress aliases interactively.

Notice

Original content from the ShellCheck https://github.com/koalaman/shellcheck/wiki.

This directive is unknown. It will be ignored.
Open

# shellcheck disable=SC2086 # safe args
Severity: Minor
Found in mvnw by shellcheck

This directive is unknown. It will be ignored.

Problematic code:

# shellcheck foobar=baz
echo "Hello World"

Correct code:

Depends on your intention.

Rationale:

ShellCheck doesn't recognize the [[directive]] you're trying to use in a # shellcheck comment. See the [[Directive]]s page for supported directives.

It could be misspelled, or you could be using an older version of shellcheck that doesn't support it yet.

Exceptions:

None. If you wish to ignore this warning and continue without it, you need version 0.4.5 (commit 88c56ec) or later and a command grouping:

# Ignore an unrecognized directive in 0.4.5 or later:
# shellcheck disable=SC1107
{
  # shellcheck unrecognized=directive
  echo "Hello World"
}

Before 0.4.5, unrecognized directives are considered parse errors.

Notice

Original content from the ShellCheck https://github.com/koalaman/shellcheck/wiki.

This directive is unknown. It will be ignored.
Open

# shellcheck disable=SC2086 # safe args
Severity: Minor
Found in mvnw by shellcheck

This directive is unknown. It will be ignored.

Problematic code:

# shellcheck foobar=baz
echo "Hello World"

Correct code:

Depends on your intention.

Rationale:

ShellCheck doesn't recognize the [[directive]] you're trying to use in a # shellcheck comment. See the [[Directive]]s page for supported directives.

It could be misspelled, or you could be using an older version of shellcheck that doesn't support it yet.

Exceptions:

None. If you wish to ignore this warning and continue without it, you need version 0.4.5 (commit 88c56ec) or later and a command grouping:

# Ignore an unrecognized directive in 0.4.5 or later:
# shellcheck disable=SC1107
{
  # shellcheck unrecognized=directive
  echo "Hello World"
}

Before 0.4.5, unrecognized directives are considered parse errors.

Notice

Original content from the ShellCheck https://github.com/koalaman/shellcheck/wiki.

Not following: /usr/local/etc/mavenrc: openFile: does not exist (No such file or directory)
Open

    . /usr/local/etc/mavenrc
Severity: Minor
Found in mvnw by shellcheck

Not following: (error message here)

Reasons include: file not found, no permissions, not included on the command line, not allowing shellcheck to follow files with -x, etc.

Problematic code:

source somefile

Correct code:

# shellcheck disable=SC1091
source somefile

Rationale:

ShellCheck, for whichever reason, is not able to access the source file.

This could be because you did not include it on the command line, did not use shellcheck -x to allow following other files, don't have permissions or a variety of other problems.

Feel free to ignore the error with a [[directive]].

Exceptions:

If you're fine with it, ignore the message with a [[directive]].

Notice

Original content from the ShellCheck https://github.com/koalaman/shellcheck/wiki.

This \c will be a regular 'c' in this context.
Open

    JAVACMD="$(\unset -f command 2>/dev/null; \command -v java)"
Severity: Minor
Found in mvnw by shellcheck

This \o will be a regular 'o' in this context.

Problematic code:

# Want literal backslash
echo Yay \o/

# Want linefeed
greeting=Hello\nWorld

# Want other characters
carriagereturn=\r

Correct code:

echo 'Yay \o/'

greeting='Hello
World'

carriagereturn=$(printf '\r')

Rationale:

You have escaped something that has no special meaning when escaped. The backslash will be simply be ignored.

If the backslash was supposed to be literal, single quote or escape it.

If you wanted it to expand to something, rewrite the expression. For linefeeds (\n), put them literally in quotes. For other characters, use POSIX printf or bash/ksh $'...'.

Exceptions

None. ShellCheck (as of 2017-07-03, commit 31bb02d6) will not warn when the first letter of a command is unnecessarily escaped, as this is frequently used to suppress aliases interactively.

Notice

Original content from the ShellCheck https://github.com/koalaman/shellcheck/wiki.

Not following: /etc/mavenrc: openFile: does not exist (No such file or directory)
Open

    . /etc/mavenrc
Severity: Minor
Found in mvnw by shellcheck

Not following: (error message here)

Reasons include: file not found, no permissions, not included on the command line, not allowing shellcheck to follow files with -x, etc.

Problematic code:

source somefile

Correct code:

# shellcheck disable=SC1091
source somefile

Rationale:

ShellCheck, for whichever reason, is not able to access the source file.

This could be because you did not include it on the command line, did not use shellcheck -x to allow following other files, don't have permissions or a variety of other problems.

Feel free to ignore the error with a [[directive]].

Exceptions:

If you're fine with it, ignore the message with a [[directive]].

Notice

Original content from the ShellCheck https://github.com/koalaman/shellcheck/wiki.

Expected an indentation at 4 instead of at 2.
Open

  if [ -f "$HOME/.mavenrc" ] ; then
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 4 instead of at 2.
Open

  MINGW*) mingw=true;;
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 4 instead of at 2.
Open

  if [ -n "$javaExecutable" ] && ! [ "$(expr "\"$javaExecutable\"" : '\([^ ]*\)')" = "no" ]; then
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 8 instead of at 6.
Open

      if $darwin ; then
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 4 instead of at 2.
Open

  echo "  We cannot execute $JAVACMD" >&2
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 4 instead of at 2.
Open

  then
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 8 instead of at 6.
Open

      break
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 4 instead of at 2.
Open

  fi
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 8 instead of at 6.
Open

      else
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 8 instead of at 6.
Open

      javaHome=$(expr "$javaHome" : '\(.*\)/bin')
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 4 instead of at 2.
Open

  "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 4 instead of at 2.
Open

  CYGWIN*) cygwin=true ;;
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 4 instead of at 2.
Open

  [ -n "$JAVA_HOME" ] &&
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 8 instead of at 6.
Open

      JAVA_HOME="$javaHome"
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 4 instead of at 2.
Open

  else
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 4 instead of at 2.
Open

  if [ "$MVNW_VERBOSE" = true ]; then
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 4 instead of at 2.
Open

  printf '%s' "$(cd "$basedir" || exit 1; pwd)"
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 4 instead of at 2.
Open

  fi
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 4 instead of at 2.
Open

  exit 1;
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 8 instead of at 6.
Open

      safeValue=$(echo "$value" | tr -d '\r')
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 4 instead of at 2.
Open

  if command -v sha256sum > /dev/null; then
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 4 instead of at 2.
Open

  ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@"
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 4 instead of at 2.
Open

  [ -n "$JAVA_HOME" ] && [ -d "$JAVA_HOME" ] &&
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 4 instead of at 2.
Open

  fi
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 4 instead of at 2.
Open

  while [ "$wdir" != '/' ] ; do
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 4 instead of at 2.
Open

  [ -n "$MAVEN_PROJECTBASEDIR" ] &&
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 4 instead of at 2.
Open

  $MAVEN_DEBUG_OPTS \
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 4 instead of at 2.
Open

  -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 4 instead of at 2.
Open

  if [ -f /usr/local/etc/mavenrc ] ; then
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 4 instead of at 2.
Open

  fi
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 4 instead of at 2.
Open

  [ -n "$CLASSPATH" ] &&
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 4 instead of at 2.
Open

  javaExecutable="$(which javac)"
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 4 instead of at 2.
Open

  if [ -f "$1" ]; then
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 4 instead of at 2.
Open

  elif command -v shasum > /dev/null; then
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 4 instead of at 2.
Open

  if [ -f /etc/mavenrc ] ; then
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 4 instead of at 2.
Open

  fi
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 4 instead of at 2.
Open

  echo "Error: JAVA_HOME is not defined correctly." >&2
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 4 instead of at 2.
Open

  exit 1
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 4 instead of at 2.
Open

  done
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 8 instead of at 6.
Open

      case "$key" in (wrapperUrl) wrapperUrl="$safeValue"; break ;;
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 4 instead of at 2.
Open

  fi
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 4 instead of at 2.
Open

  $MAVEN_OPTS \
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 8 instead of at 6.
Open

      fi
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 4 instead of at 2.
Open

  if [ -z "$1" ]
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 8 instead of at 6.
Open

      # Remove '\r' from value to allow usage on windows as IFS does not consider '\r' as a separator ( considers space, tab, new line ('\n'), and custom '=' )
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 8 instead of at 6.
Open

      esac
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 4 instead of at 2.
Open

  [ -n "$CLASSPATH" ] &&
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 4 instead of at 2.
Open

  if [ -n "$JAVA_HOME"  ] ; then
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 8 instead of at 6.
Open

      # IBM's JDK on AIX uses strange locations for the executables
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 8 instead of at 6.
Open

      JAVACMD="$JAVA_HOME/jre/sh/java"
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 4 instead of at 2.
Open

  fi
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 4 instead of at 2.
Open

  echo "Warning: JAVA_HOME environment variable is not set."
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 4 instead of at 2.
Open

  basedir="$1"
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 4 instead of at 2.
Open

  wdir="$1"
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 8 instead of at 6.
Open

      wrapperSha256Result=true
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 4 instead of at 2.
Open

  fi
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 8 instead of at 6.
Open

      fi
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 8 instead of at 6.
Open

      javaHome="$(dirname "\"$javaExecutable\"")"
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 8 instead of at 6.
Open

      wrapperJarPath=$(cygpath --path --windows "$wrapperJarPath")
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 12 instead of at 10.
Open

          javaSource=$(cygpath --path --windows "$javaSource")
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 8 instead of at 6.
Open

      if [ -x "/usr/libexec/java_home" ]; then
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 8 instead of at 6.
Open

      export JAVA_HOME
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 4 instead of at 2.
Open

  Darwin*) darwin=true
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 8 instead of at 6.
Open

      else
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 4 instead of at 2.
Open

  fi
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 8 instead of at 6.
Open

      basedir=$wdir
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 4 instead of at 2.
Open

  fi
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 12 instead of at 10.
Open

          javaClass=$(cygpath --path --windows "$javaClass")
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 4 instead of at 2.
Open

  esac
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 8 instead of at 6.
Open

      wrapperSha256Result=true
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 4 instead of at 2.
Open

  else
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 4 instead of at 2.
Open

  fi
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 8 instead of at 6.
Open

      JAVACMD="$JAVA_HOME/bin/java"
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 8 instead of at 6.
Open

      wdir=$(cd "$wdir/.." || exit 1; pwd)
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 8 instead of at 6.
Open

      wrapperUrl="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar"
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 4 instead of at 2.
Open

  if [ $wrapperSha256Result = false ]; then
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 4 instead of at 2.
Open

  [ -n "$JAVA_HOME" ] &&
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 4 instead of at 2.
Open

  if [ -r /etc/gentoo-release ] ; then
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 8 instead of at 6.
Open

      wrapperUrl="$MVNW_REPOURL/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar"
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 4 instead of at 2.
Open

  case "$key" in (wrapperSha256Sum) wrapperSha256Sum=$value; break ;;
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 4 instead of at 2.
Open

  wrapperSha256Result=false
Severity: Minor
Found in mvnw by editorconfig

There are no issues that match your filters.

Category
Status