alibaba/java-dns-cache-manipulator

View on GitHub
mvnw

Summary

Maintainability
Test Coverage

Expected an indentation at 8 instead of at 6.
Open

      if [ ! -x "$JAVACMD" ] || [ ! -x "$JAVACCMD" ]; then
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 4 instead of at 2.
Open

  #   Trims trailing and leading whitespace, carriage returns, tabs, and linefeeds.
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 4 instead of at 2.
Open

  [ -z "${JAVA_HOME-}" ] || JAVA_HOME="$(cygpath --unix "$JAVA_HOME")"
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

      'set' +e
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 4 instead of at 2.
Open

  str="${1:-}" h=0
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 4 instead of at 2.
Open

  case "${key-}" in
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 8 instead of at 6.
Open

      JAVACCMD="$JAVA_HOME/jre/sh/javac"
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 8 instead of at 6.
Open

      'unset' -f command 2>/dev/null
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 4 instead of at 2.
Open

  *)
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 4 instead of at 2.
Open

  clean() { rm -rf -- "$TMP_DOWNLOAD_DIR"; }
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 4 instead of at 2.
Open

  verbose "Found wget ... using wget"
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 4 instead of at 2.
Open

  wget ${__MVNW_QUIET_WGET:+"$__MVNW_QUIET_WGET"} "$distributionUrl" -O "$TMP_DOWNLOAD_DIR/$distributionUrlName" || die "wget: Failed to fetch $distributionUrl"
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 4 instead of at 2.
Open

  verbose "Falling back to use Java to download"
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 4 instead of at 2.
Open

  targetZip="$TMP_DOWNLOAD_DIR/$distributionUrlName"
Severity: Minor
Found in mvnw by editorconfig

Unexpected tabs found.
Open

      {
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 4 instead of at 2.
Open

  javaSource="$TMP_DOWNLOAD_DIR/Downloader.java"
Severity: Minor
Found in mvnw by editorconfig

Unexpected tabs found.
Open

      {
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

  #   Needed for removing poorly interpreted newline sequences when running in more
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 4 instead of at 2.
Open

  printf "%s" "${1}" | tr -d '[:space:]'
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 4 instead of at 2.
Open

  distributionUrl) distributionUrl=$(trim "${value-}") ;;
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 4 instead of at 2.
Open

  unset MVNW_VERBOSE MVNW_USERNAME MVNW_PASSWORD MVNW_REPOURL || :
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 8 instead of at 6.
Open

      'command' -v javac
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 4 instead of at 2.
Open

  printf %s\\n "$1" >&2
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 4 instead of at 2.
Open

  distributionSha256Sum) distributionSha256Sum=$(trim "${value-}") ;;
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 4 instead of at 2.
Open

  :Darwin*x86_64) distributionPlatform=darwin-amd64 ;;
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 4 instead of at 2.
Open

  distributionUrl="${distributionUrl%-bin.*}-$distributionPlatform.zip"
Severity: Minor
Found in mvnw by editorconfig

Unexpected tabs found.
Open

    }
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 4 instead of at 2.
Open

  curl ${__MVNW_QUIET_CURL:+"$__MVNW_QUIET_CURL"} -f -L -o "$TMP_DOWNLOAD_DIR/$distributionUrlName" "$distributionUrl" || die "curl: Failed to fetch $distributionUrl"
Severity: Minor
Found in mvnw by editorconfig

Unexpected tabs found.
Open

        return new java.net.PasswordAuthentication( System.getenv( "MVNW_USERNAME" ), System.getenv( "MVNW_PASSWORD" ).toCharArray() );
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 8 instead of at 6.
Open

      'unset' -f command 2>/dev/null
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 8 instead of at 6.
Open

      echo "The java/javac command does not exist in PATH nor is JAVA_HOME set, so mvnw cannot run." >&2
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 4 instead of at 2.
Open

  printf %x\\n $h
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 4 instead of at 2.
Open

  #   exotic environments such as mingw bash on Windows.
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 4 instead of at 2.
Open

  ;;
Severity: Minor
Found in mvnw by editorconfig

Unexpected tabs found.
Open

      protected java.net.PasswordAuthentication getPasswordAuthentication()
Severity: Minor
Found in mvnw by editorconfig

Unexpected tabs found.
Open

      }
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 4 instead of at 2.
Open

  ;;
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 4 instead of at 2.
Open

  # MWRAPPER-139:
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 4 instead of at 2.
Open

  while [ -n "$str" ]; do
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 4 instead of at 2.
Open

  :Darwin*arm64) distributionPlatform=darwin-aarch64 ;;
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 4 instead of at 2.
Open

  MVN_CMD=mvnd.sh _MVNW_REPO_PATTERN=/maven/mvnd/
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 4 instead of at 2.
Open

  *AMD64:CYGWIN* | *AMD64:MINGW*) distributionPlatform=windows-amd64 ;;
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 4 instead of at 2.
Open

  exec "$MAVEN_HOME/bin/$MVN_CMD" "$@" || die "cannot exec $MAVEN_HOME/bin/$MVN_CMD"
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 4 instead of at 2.
Open

  # For Cygwin and MinGW, ensure paths are in Unix format before anything is touched
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

  done
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 4 instead of at 2.
Open

  cat >"$javaSource" <<-END
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 4 instead of at 2.
Open

  native_path() { cygpath --path --windows "$1"; }
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

      'command' -v java
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 4 instead of at 2.
Open

  case "${PROCESSOR_ARCHITECTURE-}${PROCESSOR_ARCHITEW6432-}:$(uname -a)" in
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 4 instead of at 2.
Open

  :Linux*x86_64*) distributionPlatform=linux-amd64 ;;
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 4 instead of at 2.
Open

  verbose "found existing MAVEN_HOME at $MAVEN_HOME"
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 4 instead of at 2.
Open

  else
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 8 instead of at 6.
Open

      return 1
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 4 instead of at 2.
Open

  trap clean HUP INT TERM EXIT
Severity: Minor
Found in mvnw by editorconfig

Unexpected tabs found.
Open

    public class Downloader extends java.net.Authenticator
Severity: Minor
Found in mvnw by editorconfig

Unexpected tabs found.
Open

        java.nio.file.Files.copy( java.net.URI.create( args[0] ).toURL().openStream(), java.nio.file.Paths.get( args[1] ).toAbsolutePath().normalize() );
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

  verbose "Found curl ... using curl"
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 8 instead of at 6.
Open

      'set' +e
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 4 instead of at 2.
Open

  die "cannot create temp dir"
Severity: Minor
Found in mvnw by editorconfig

Unexpected tabs found.
Open

      }
Severity: Minor
Found in mvnw by editorconfig

Unexpected tabs found.
Open

        setDefault( new Downloader() );
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 8 instead of at 6.
Open

      JAVACCMD="$JAVA_HOME/bin/javac"
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 4 instead of at 2.
Open

  exec_maven "$@"
Severity: Minor
Found in mvnw by editorconfig

Unexpected tabs found.
Open

    {
Severity: Minor
Found in mvnw by editorconfig

Unexpected tabs found.
Open

      public static void main( String[] args ) throws Exception
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 4 instead of at 2.
Open

  verbose " - Running Downloader.java ..."
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 4 instead of at 2.
Open

  distributionSha256Result=false
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 4 instead of at 2.
Open

  "$(native_path "$JAVACMD")" -cp "$(native_path "$TMP_DOWNLOAD_DIR")" Downloader "$distributionUrl" "$(native_path "$targetZip")"
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

  "$(native_path "$JAVACCMD")" "$(native_path "$javaSource")" || die "Failed to compile Downloader.java"
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 4 instead of at 2.
Open

  elif command -v sha256sum >/dev/null; 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

  unzip ${__MVNW_QUIET_UNZIP:+"$__MVNW_QUIET_UNZIP"} "$TMP_DOWNLOAD_DIR/$distributionUrlName" -d "$TMP_DOWNLOAD_DIR" || die "failed to unzip"
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 4 instead of at 2.
Open

  if [ "$MVN_CMD" = mvnd.sh ]; then
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 4 instead of at 2.
Open

  if [ $distributionSha256Result = false ]; 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 8 instead of at 6.
Open

      distributionSha256Result=true
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 8 instead of at 6.
Open

      distributionSha256Result=true
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

  tar xzf${__MVNW_QUIET_TAR:+"$__MVNW_QUIET_TAR"} "$TMP_DOWNLOAD_DIR/$distributionUrlName" -C "$TMP_DOWNLOAD_DIR" || die "failed to untar"
Severity: Minor
Found in mvnw by editorconfig

Unexpected tabs found.
Open

    END
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 4 instead of at 2.
Open

  # For Cygwin/MinGW, switch paths to Windows format before running javac and java
Severity: Minor
Found in mvnw by editorconfig

Expected an indentation at 4 instead of at 2.
Open

  verbose " - Compiling Downloader.java ..."
Severity: Minor
Found in mvnw by editorconfig

There are no issues that match your filters.

Category
Status