Command Line Interface Issues
This section describes issues that arise when writing the translator command line.
CLI01: Invalid command line option
Occurs when an option used on the command line is not from the list of current or obsolete options.
Default severity: ERROR
Example: invalid -cfg option
CodeTranslator.Cs2Cpp.Console.exe source.csproj -cfg project.config
Solution: fix or remove invalid option from command line.
CodeTranslator.Cs2Cpp.Console.exe source.csproj -c project.config
CLI02: Obsolete command line option
Occurs when an deprecated option used from the list of obsolete options.
Default severity: WARNING
Example: deprecated -q option
CodeTranslator.Cs2Cpp.Console.exe -q source.csproj
Solution: remove deprecated option from command line.
CodeTranslator.Cs2Cpp.Console.exe source.csproj
CLI03: Duplicate command line option
Occurs when an option that can only be used once is specified twice or more.
Default severity: ERROR
Example: duplicate -ct option
CodeTranslator.Cs2Cpp.Console.exe -ct source.csproj -ct
Solution: remove duplicate option from command line.
CodeTranslator.Cs2Cpp.Console.exe source.csproj -ct
CLI10: Bad option assignment
Occurs when overriding a configuration option via the -o switch has invalid syntax.
Default severity: ERROR
Example: forgotten '=' sign
CodeTranslator.Cs2Cpp.Console.exe source.csproj -o force_const_ref_parameters true
Solution: fix assignment syntax: name=value
CodeTranslator.Cs2Cpp.Console.exe source.csproj -o force_const_ref_parameters=true
CLI11: The log level is not supported, the default value 'Info' will be used instead
Occurs when new log level after of log level with -ll switch doesn't match available values: Trace, Debug, Info, Warn, Error, Fatal, Off.
Default severity: WARNING
Example: invalid log level constant
CodeTranslator.Cs2Cpp.Console.exe source.csproj -ll Silent
Solution: fix log level constant to available value
CodeTranslator.Cs2Cpp.Console.exe source.csproj -ll Off
CLI12: The severity rule has invalid format
Occurs when severity rule -sr in command line has invalid syntax.
Default severity: ERROR
Example: extra space in the issue identifier
CodeTranslator.Cs2Cpp.Console.exe source.csproj -sr cli 12 Fatal
Solution: remove extra symbols, use only valid constants
CodeTranslator.Cs2Cpp.Console.exe source.csproj -sr cli12 Fatal