devops.config.config_cpp

Module for parsing C++ configuration.

Functions

parse_cpp_config(raw_config)

Parse C++ configuration from a raw dictionary.

Classes

CppConfig([style_checks, ...])

Dataclass to hold C++ configuration values.

class devops.config.config_cpp.CppConfig(style_checks=True, license_header_check=True, license_header=None, check_only_staged_files=False, header_guards_according_to_filepath=False)[source]

Bases: object

Dataclass to hold C++ configuration values.

Parameters:
  • style_checks (bool)

  • license_header_check (bool)

  • license_header (str | None)

  • check_only_staged_files (bool)

  • header_guards_according_to_filepath (bool)

style_checks: bool = True
license_header_check: bool = True
license_header: str | None = None
check_only_staged_files: bool = False
header_guards_according_to_filepath: bool = False
to_toml_lines()[source]

Convert the CppConfig to TOML lines.

Returns:

list[str] – The list of TOML lines representing the configuration.

Return type:

list[str]

devops.config.config_cpp.parse_cpp_config(raw_config)[source]

Parse C++ configuration from a raw dictionary.

Parameters:

raw_config (dict) – The raw C++ configuration dictionary.

Returns:

CppConfig – The parsed CppConfig dataclass instance.

Return type:

CppConfig