Using ldcupdate#

Command-Line#

ldcupdate <project-file> -module:[Module-Id] [Module Options] [-deltaTags] [-generateDetailedReport] [-atomdb:true|false] [-merge] [-dobackups] [input files] -report:[FileFormat] -reportFile:<report-file> -deltaviolations:<dviol-file>

ldcupdate allows the user to create a new project from source code, or update an existing project with new source code. It can produce a change report that shows which elements are new or which are no longer present. The report also contains a list of violations that are new and those that have been fixed. You can generate the delta violations report in a separate file - the file is not generated if no new violations were added or old violations removed. The presence or absence of the violations file can be used to determine if additional action is required after the update.

Caveat: Please note that input specification using wild cards should not be used to update projects, if the project being updated was created by explicitly listing the input files.

Examples#

  • ldcupdate <ProjectFile.ldz> -module:java file1.jar file2.jar earfile!warfile!file.jar earfile!web.war!WEB-INF/lib[*.jar] earfile[file.jar] -report:txt -reportFile:<ReportFilename>

    Create a new project from specified source and generate a report on it. If the project exists already, it will update it with the specified source, and report on the changes between the two projects. File names can be full path names. EAR and WAR files are treated like directories except that the delimiter character at the end is ‘!’ instead of ‘/’.

  • ldcupdate sample.ldz -module:java sample.ear[*.jar]

  • ldcupdate sample.ldz -module:java sample.ear!WEB-INF/lib[*.jar]

  • ldcupdate sample.ldz -module:java sample.ear!file.war[*.class]

  • ldcupdate <ProjectFile.ldz> -module:dotnet @flist.txt

    Create/update a project. The ‘@’ prefix in the input file name tells update to use the contents of the file to obtain the actual input list of files. The ‘@’ option is available in Lattix 7.2+.

  • ldcupdate <ProjectFile.ldz> -deltaviolations:<DeltaviolationsFilename>

    Update the given project with the latest source files defined in the project, and generate a report on the changes in violations. The violations report file is not generated if there were no changes.

  • ldcupdate <ProjectFile.ldz> -module:java -memberProcessing:all -expandMembersInDSM input1.jar input2.jar

    Update or create a project with member level turned on.

  • ldcupdate <ProjectFile.ldz> -module:dotnet -memberProcessing:all -expandMembersInDSM dll:DirName/[*.dll]

    Update or create a project by loading in all dlls in the specified directory with member level turned on.

  • ldcupdate <ProjectFile.ldz> -atomdb:true

    Update a project and turn on the atom database. Setting atomdb:false will turn off the atom database. If this option is not specified, the updated project will have the same atom database setting as the input project.

  • ldcupdate -help

    Dump out the arguments to ldcupdate.

  • ldcupdate -help:ModuleOptions

    Dump out all available modules and their options.

  • ldcupdate -help:java

    Dump out the options for the java module.

Module Options#

As newer modules and options are added, you can use the help option to obtain the current information. Here is a list of modules and options in current use:

Module Id:
  bsc
Module Loading Options:
  -memberProcessing:[none|some|all]
  -headerpat:<regexp>
  -excsym:[class|enum_name|enum_mem|mem_func|struct_name|constant|typedef]
  -pruneAtoms
  -processRemapAtoms
  -processExterns
  -detectComFiles
  -processUndef
  -processMultidef
  -processContextFree
  -logFile:<File-Name>

Module Id:
  delphi
Module Loading Options:
  -logfile:<File Name>

Module Id:
  dotnet
Module loading options:
  -memberProcessing:[none|some|all]
  -expandMembersInDSM
  -dependency_line_numbers
  -dotnet_include_prefix:<Class Namespace Prefix>[,<Class Namespace Prefix>...]
  -dotnet_exclude:<value>[,<value>...]
  -logfile:<File-Name>
Module partitioning options:
  -createFileSubsystem

Module Id:
  doxygen
Module loading options:
  -memberProcessing:[none|some|all]
  -expandMembersInDSM
  -dependency_line_numbers
  -logfile:<File Name>

Module Id:
  hibernate
Module loading options:
  -dbTablePrefix:<value>
  -dbQueryPrefix:<value>
  -dbSequencePrefix:<value>
  -verbose
  -strict
  -logfile:<value>

Module Id:
  java
Module loading options:
  -memberProcessing:[none|some|all]
  -expandMembersInDSM
  -dependency_line_numbers
  -java_include_pattern:<Include class pattern>[,<Include class pattern>...]
  -java_exclude_pattern:<Exclude class pattern>[,<Exclude class pattern>...]
  -createFileSubsystem

ModuleId: klc
 Module input types:
      klocworkdatabase:host=<value>,port=<value>,user=<value>,password=<value>,project=<value>,build=<value>

      host=Host
      port=Port
      user=Username
      password=Password (optional)
      project=Project
      build=Build (optional - if not specified, use latest)

 Module loading options:
   -memberProcessing:[none|some|all]
   -expandMembersInDSM
   -dependency_line_numbers
   -filterSymbols:<value>[,<value>...]
   -headerFileExts:<value>[,<value>...]

Module Id:
  ldx
Module loading options:
  -logfile:<value>

Module Id:
  oracle
Module loading options:
  -createAtomsForSynonyms
  -movePublicSynonyms

Module Id:
  spring
Module loading options:
  -logfile:<value>
  -strict

Module Id:
  sql
Module loading options:
  -memberProcessing:[none|some|all]
  -allMetaData
  -saveSource
  -parseSource
  -dbs:<value>[,<value>...]

Module Id:
  understand-cpp
Module loading options:
  -memberProcessing:[none|some|all]
  -expandMembersInDSM
  -dependency_line_numbers
  -filterSymbols:<value>[,<value>...]
  -filterFilesList:[,<value>...]
  -removePrefix:[,<value>...]
  -filterFilesEnable
  -filterHeaderFileDependencies
  -foldUnnamedIntoTypeDef
  -filterDuplicateGlobals
  -skipHeaderFileRefs

Module Id:
  understand-ada
Module loading options:
  -memberProcessing:[none|some|all]
  -expandMembersInDSM
  -dependency_line_numbers
  -filterSymbols:<value>[,<value>...]

File Format#

FileFormat:
  txt,xml,html,excel

Success or Failure#

Returns success or failure to the calling script, where failure is the inability to complete its processing.