Calling Options *************** .. _os_command_options: .. list-table:: |os_command_name| options :widths: 20 60 20 :header-rows: 1 * - Option - Description - Optional * - ``--os-compile-db`` - Path (absolute or relative) to the ``compile_commands.json`` file used for analysis. If a relative path is provided, it is resolved against the project folder (``--dir``). - Yes * - ``--os-compiler-args`` - Extra compiler flags passed to the analysis (for example ``-DDEBUG`` or ``-Ipath``). Can be repeated. - Yes * - ``--os-arxml`` - Glob pattern (absolute or relative) to ARXML files containing the OS ECUC configuration. Can be repeated. If not specified, RTA‑SQF searches the project folder (``--dir``) and its subdirectories for ARXML files. - Yes The General Options, valid for all commands, are listed in :ref:`global-options `. Glob patterns for file paths ============================ When glob patterns are allowed (see ``--os-arxml``), the supported pattern formats are documented at :cite:t:`file_globbing`. In summary: - only \`*\` (within a single directory level) and \`**\` (across directory levels) are officially supported. - \`?\` and \`[...]\` are POSIX glob characters but are **not** supported by this library. - \`**/\` is supported and is the standard way to express recursive directory descent. Case sensitivity ---------------- Matching is **case-insensitive on all platforms** (Windows and Linux). .. code:: --os-arxml="**/*.arxml" # matches "config.ARXML", "CONFIG.arxml", etc. Directory separators -------------------- Both \`/\` and \`\\\` are accepted and treated as equivalent. .. code:: **/*.arxml and **\*.arxml → same result Dot-directories --------------- Directories starting with \`.\` are traversed like any other directory — they are not skipped. .. code:: --os-arxml **/*.arxml → descends into .git/, .hidden/, etc. if present Symlinks -------- Symlinks are followed. A symlink pointing to a directory is traversed as if it were a real directory. Circular symlinks (a symlink loop) are not detected and cause the tool to hang. Examples ======== The simplest form of a call uses only the :ref:`os-compile-db ` parameter: .. code:: bash rta-sqf os --os-compile-db="C:\project\Build\CMakeBuild\compile_commands.json" An alternative way is to use the :ref:`dir ` parameter: .. code:: bash rta-sqf os --dir="C:\project" rta-sqf os --dir="C:\project" --os-compile-db="Build\CMakeBuild\compile_commands.json" ---- The :ref:`only ` option can be used to limit validation to a subset of AoUs: .. code:: bash rta-sqf os --os-compile-db="C:\project\Build\CMakeBuild\compile_commands.json" --only=ETAS_RTACAR_SM_OS_187 rta-sqf os --os-compile-db="C:\project\Build\CMakeBuild\compile_commands.json" --only=ETAS_RTACAR_SM_OS_187,ETAS_RTACAR_SM_OS_206 ---- The :ref:`ignore ` option can be used to exclude a subset of AoUs from validation: .. code:: bash rta-sqf os --os-compile-db="C:\project\Build\CMakeBuild\compile_commands.json" --ignore=ETAS_RTACAR_SM_OS_187 rta-sqf os --os-compile-db="C:\project\Build\CMakeBuild\compile_commands.json" --ignore=ETAS_RTACAR_SM_OS_187,ETAS_RTACAR_SM_OS_206 ---- By defining the :ref:`verbose ` option, additional information about the execution will be shown on the console .. code:: bash rta-sqf os --os-compile-db="C:\project\Build\CMakeBuild\compile_commands.json" --verbose ---- To choose the folder where the rta-sqf tool will store the results, use the :ref:`out-dir ` option. .. code:: bash rta-sqf os --os-compile-db="C:\project\Build\CMakeBuild\compile_commands.json" --out-dir=".\checkResult" --verbose .. note:: Output folder creation If the specified output directory does not exist, the tool will attempt to create it. ---- The :ref:`os-compiler-args ` parameter can be used to pass additional compiler arguments to the source code analysis: .. code:: bash rta-sqf os --os-compile-db="C:\project\Build\CMakeBuild\compile_commands.json" --os-compiler-args="-DDEBUG" --os-compiler-args="-IC:\include" rta-sqf os --os-compile-db="C:\project\Build\CMakeBuild\compile_commands.json" --os-compiler-args -DDEBUG --os-compiler-args -IC:\include The supported arguments are those accepted by the 'clang' compiler. .. note:: os-compiler-args option for clang compiler. The arguments are passed to the compiler as they are, so the user should be aware of the correct syntax and semantics of the arguments. Please refer to the 'clang' compiler documentation for more information about the supported arguments. Compilation is performed by a 'clang'-based compiler, and code processing is limited to the preprocessing phase to generate the AST (Abstract Syntax Tree) for analysis.