Guidelines

This document shows guidelines for code contributers, mainly focused on C++ code.

Licensing

Each code file (header and source) requires SPDX license and copyright headers with a specific syntax

// SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
// SPDX-License-Identifier: BSD-3-Clause

If a secondary copyright must be added, format as follows:

// SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
// SPDX-FileCopyrightText: Copyright (c) NAME_OF_PERSON_OR_INSTITUTE_CONTRIBUTING_THE_CODE
// SPDX-License-Identifier: BSD-3-Clause

Please note it is not required to add your own copyright line when modifying or adding a file. Even without adding it you still own copyrights on the line you modified or added in the file according to the git history. Consider instead adding a @thanks tag in the documentation of the class.

If the code must be contributed under another license than BSD-3-Clause license, contact maintainers to find the right formalism and ensure license compatibility before contributing.

Find more information about Software Package Data Exchange (SPDX) and Software Bill of Materials (SBOM) in the VTK documentation: https://gitlab.kitware.com/vtk/vtk/-/blob/master/Documentation/docs/advanced/spdx_and_sbom.md "SPDX & SBOM"

C++ Preprocessor

C++ Language

Naming Conventions

Code Formatting

Comments

/**
* This comments the function
*/
void TheFunction();