Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Added .jsx extension in javascript languages analysis
  • KLA (KiuwanLocalAnalyzer) now runs under Java 16
  • New Cobol preprocessor script

A new script (cobolPreprocess.xml) for pre-processing COBOL sources and replacing COPY statements with the content of copybooks is provided. This tool is useful when COPY statements are used in a way that makes the common strategy of parsing separately COBOL programs and copybooks lead to a high rate of parse errors but with the cost of losing the original source code lines in reported defects, due to plain code substitution. The script is located in the local analyzer bin directory, and usage is as follows:


Code Block
ant -f cobolPreprocess.xml run
  -Dinput=SOURCES_DIR
  [-Ddialect=cobol85|cobolibm|cobolmicrofocus|coboltandem|acucobol|rmcobol]
  [-Dfreeform=true|false] [-Dencoding=ENCODING]
  [-DmarginType=autodetect|no_margin|left_margin|right_margin|both_margin|
                already_transformed|tandem|tandem_ansi|terminal]
  [-Dinclude=INCLUDE_PATTERNS] [-Dexclude=EXCLUDE_PATTERNS]
  [-DprogramExtensions=extensions] [-DcopyExtensions=extensions]
  [-Doutput=OUTPUT_DIR]

where:

  • SOURCES_DIR: The input
  • dialect: cobol85, cobolibm, cobolmicrofocus, coboltandem, acucobol, rmcobol.
    Default: cobol85.
  • marginType: The margin type to use when formatting. The default, autodetect, tries to detect the margin format heuristically. both_margin is the ANSI format.
  • freeform: true | false. If true, free-format COBOL. Default: false.
  • encoding: The encoding for reading and writing files. Default: UTF-8.
  • programExtensions: Extensions for COBOL programs. Default: cob,cbl,cobol,pco.
  • copyExtensions: Extensions for COBOL copybooks. Default: cpy,copy.
  • include: Comma-separated patterns of files to include. Two asterisks mean 'all directories and subdirectories'. Default: */.
  • exclude: Comma-separated patterns of files to include. Default: empty.
  • OUTPUT_DIR: Directory where the pre-processed files will be written. Defaults to the current directory.
  • Added support for the JavaScript Vue.js framework. The following rules were added:
    • VueComponentDataMustBeFunction: Component data must be a function.
    • VueForWithoutKey: Always use key with v-for.
    • VueHtmlEscapeDisabled: Vue HTML escaping is disabled.
    • VueIfWithForDirective: Never use v-if on the same element as v-for.
  • Update CWETOP25 tags to 2021 version
  • Added new mapping for the latest 2021 OWASP Top10 list.

...