Giter Site home page Giter Site logo

Comments (1)

BradleyA avatar BradleyA commented on June 11, 2024

Current ruff draft:

###     CUT HERE <<<<<<   -> when adding case statement
#       Prompt for single-line beginning comment character(s)
echo -e "Enter single-line beginning comment character(s) to use\n   (example: # // -- ' ! s !* -- // % ;;      /* <!-- <!--- {- /** --[[ %{ (* <# ):"
read BEGIN_COMMENT_CHAR
#
if [ -z ${BEGIN_COMMENT_CHAR} ] ; then
    display_help
    echo -e "${0} ${LINENO} [ERROR]:        Single-line comment character(s) is required.\n"       1>&2
    exit 1
fi
###
#       >>>     This test code will need to be placed in the for loop so each file will use or prompt for the correct single-line beginning comment
#       >>>     create a case statement if other non-extension files like dockerfile need support  
#       >>>     Add support for dockerfile ('#') before prompt for single-line beginning comment character 
#       if [ "${FILE_RELEASE}" == "dockerfile" ] ; then
#          BEGIN_COMMENT_CHAR="#        "
#          END_COMMENT_CHAR=""
#       else
### >>> insert case statement HERE <<<
#       fi
#               
#       single-line comment character(s) matching file extension
#       ONLY SUPPORT single-line comments NOT multiple line block comment
#       case $variable in
#          sh|pl|PL|py|rb|ps1|php|php3|php4|ph3|ph4|R|yml|yaml|mk|MK)
#             # UNIX shell(sh) perl(pl|PL) python(py) ruby(rb) PowerShell(ps1)  PHP(php|php3|php4|ph3|ph4) R(R) YAML(yml|yaml) makefile(mk|MK)
#             BEGIN_COMMENT_CHAR="#     "
#             END_COMMENT_CHAR=""
#             ;;
#          c|h|H|hpp|hxx|Hxx|HXX|)
#             # c(c) C header(h|H|hpp) C++ header(hxx|Hxx|HXX) 
#             BEGIN_COMMENT_CHAR="/* "
#             END_COMMENT_CHAR=" */"
#             ;;
#          cc|cpp|c++|cxx|go|java|class|jar|js|kt|kts|p|pp|pas|rs|rlib|scala|sc)
#             # C++(cc|cpp|c++|cxx) Go(g0) Java(java|class|jar) JavaScript(js) Kotlin(kt|kts) Pascal (p|pp|paa) Rust(rs|rlib) Scala(scala|sc)
#             BEGIN_COMMENT_CHAR="// "
#             END_COMMENT_CHAR=""
#             ;;
#          xml|html|htm)
#             # XML(xml) HTML (html|htm) 
#             BEGIN_COMMENT_CHAR="<!-- "
#             END_COMMENT_CHAR=" -->"
#             ;;
#          *)
#             Prompt for single-line beginning comment character(s)
#             echo -e "Enter single-line beginning comment character(s) to use\n   (example: # // -- ' ! C !* -- // % ;;  ||  /* <!-- <!--- {- /** --[[ %{ (* <# )"
#             read BEGIN_COMMENT_CHAR
#             if [ -z ${BEGIN_COMMENT_CHAR} ] ; then
#               display_help
#               echo -e "${0} ${LINENO} [ERROR]:        Single-line comment character(s) is required.\n"       1>&2
#               exit 1
#             fi
#             echo -e "Enter single-line ending comment character(s) to use\n (example: */ --> ---> -} */ --]] %} *) #> )"
#             read END_COMMENT_CHAR
#             ;;
#       esac
###
###     CUT HERE <<<<<<    -> when adding case statement

from markit.

Related Issues (20)

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.