Git Product home page Git Product logo

nexus-tools's People

Contributors

lesserwhirls avatar tiffanycmeyer13 avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

nexus-tools's Issues

Shellcheck returns some warnings and a couple of errors in `nexus-upload.sh`

Shellcheck returns some warnings and errors. I can't capture the syntax highlight, so the high-priority issues are presented first, followed by the verbose output.

I can try to address these after I get the release out, but I wanted to record the issues while I was looking at it.

High priority errors

First issue:

In nexus-upload.sh line 133:
  if [[ ! " ${VALID_VALUES_ARRAY[@]} " =~ " ${VALUE_TO_VALIDATE} " ]]; then
          ^--------------------------^ SC2199: Arrays implicitly concatenate in [[ ]]. Use a loop (or explicit * instead of @).
                                          ^----------------------^ SC2076: Remove quotes from right-hand side of =~ to match as a regex rather than literally.

Second issue:

In nexus-upload.sh line 204:
for F in ${EXPRESSION[@]}; do
         ^--------------^ SC2068: Double quote array expansions to avoid re-splitting elements.

Verbose Output

In nexus-upload.sh line 111:
VALID_RAW_REPO_TYPES=( "docs" "downloads" )
^------------------^ SC2034: VALID_RAW_REPO_TYPES appears unused. Verify use (or export if used externally).


In nexus-upload.sh line 112:
VALID_PROJECTS=( "idv" "ldm" "netcdf-c" "netcdf-cxx" "netcdf-fortran"
^------------^ SC2034: VALID_PROJECTS appears unused. Verify use (or export if used externally).


In nexus-upload.sh line 133:
  if [[ ! " ${VALID_VALUES_ARRAY[@]} " =~ " ${VALUE_TO_VALIDATE} " ]]; then
          ^--------------------------^ SC2199: Arrays implicitly concatenate in [[ ]]. Use a loop (or explicit * instead of @).
                                          ^----------------------^ SC2076: Remove quotes from right-hand side of =~ to match as a regex rather than literally.


In nexus-upload.sh line 200:
  read -sp 'Please enter your artifacts server password: ' PASSWORD </dev/tty
  ^--^ SC2162: read without -r will mangle backslashes.


In nexus-upload.sh line 204:
for F in ${EXPRESSION[@]}; do
         ^--------------^ SC2068: Double quote array expansions to avoid re-splitting elements.


In nexus-upload.sh line 220:
    UPLOAD_OPT="--upload-file "${F}" "${URL}""
                               ^--^ SC2027: The surrounding quotes actually unquote this. Remove or escape them.
                                      ^----^ SC2027: The surrounding quotes actually unquote this. Remove or escape them.


In nexus-upload.sh line 225:
      OUTPUT=$(${CURL_COMMAND} -u "${USERNAME}":"${PASSWORD}" ${UPLOAD_OPT} 2> /dev/null) || RETURN_CODE=$?
                                                              ^-----------^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
      OUTPUT=$(${CURL_COMMAND} -u "${USERNAME}":"${PASSWORD}" "${UPLOAD_OPT}" 2> /dev/null) || RETURN_CODE=$?


In nexus-upload.sh line 231:
        HTTP_STATUS_CODE=$(echo "${OUTPUT}" | sed -e 's/.*\httpcode=//')
                           ^-- SC2001: See if you can use ${variable//search/replace} instead.

For more information:
  https://www.shellcheck.net/wiki/SC2068 -- Double quote array expansions to ...
  https://www.shellcheck.net/wiki/SC2199 -- Arrays implicitly concatenate in ...
  https://www.shellcheck.net/wiki/SC2027 -- The surrounding quotes actually u...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.