qacli project extensions

Map source file suffix to language.

Usage

project extensions {-A <extension>|-R <extension>|-L} -P <directory> [-T <C|C++|C/C++|Rust>] [--] [-h]

Extended Description

Perforce QAC determines how to process a source file based on the language of the source file, such as C or C++. It does this using the file extension of the source file and the operating system. For each project, a set of file extensions is mapped to a source language. See Setting the File Extensions for Your Sources for the default values.

Options

Name, shorthand Default Description
--add, -A   Add a new source extension to a particular target language.
--help, -h   Displays usage information and exits.
--ignore-rest, --   Ignores the rest of the labeled arguments following this flag.
--list, -L   Show the source extensions for a particular target language.
--qaf-project, -P . Specify a path to a valid Perforce QAC project.
--remove, -R   Remove a source extension from a particular target language.
--target-language, -T  

Set the source language to use when adding, removing or listing the source extensions.

The following target languages are available: C, C++, C/C++ and Rust.

Extensions are case sensitive.

If no leading “.” is present, then it is assumed. Therefore, “.C” and “C” are identical.

Examples

Adding a File Extension

qacli project extensions --add .cplusplus --qaf-project . --target-language C++

This will add the mapping of the source file extension “.cplusplus” to the C++ language for the Perforce QAC project in the current directory.

Displaying All File Extensions

qacli project extensions --list --qaf-project . --target-language C++

This will display all file extensions for a particular project and language, including the default values which are set when the project is created. These defaults are OS specific.

Removing an Extension

qacli project extensions --remove cplusplus --qaf-project . --target-language C++

This will remove the mapping of the source file extension “.cplusplus” to the C++ language for the Perforce QAC project in the current directory.

Removing non-existing extensions is not an error.