Skip to main content

Coding Standard

We follow the published Epic C++ Coding Standard wherever possible. There are some minor cases where we will diverge with an opinionated purpose, with inspirations from Michael Allar’s UE5 Style Guide as well.

Editor Config

Included with the project is an EditorConfig which attempts to enforce our coding standard while working on the TestProject.

Comments

Unreal Engine implements a Javadoc-style parsing system, which supports some of the tags of the typical Doxygen spec.

TagOutcomeDescription
@paramParsed
@noteParsedConverted to "Notes:" inside of tooltips.
@briefPassthrough
@remarkPassthrough
@seePassthrough
@warningIgnored
@returnParsed
Passthrough

Any @tag marked as Passthrough will show up in tooltips as-is.

Choices

  • Prefer to use int32 over int to match typedef and remove any ambiguity between 32-bit and 64-bit values.

Resharper Warnings

We disable warnings which are considered expected behaviour.

Potential GC Of Private Raw Pointers

// ReSharper disable once CppUE4ProbableMemoryIssuesWithUObjectsInContainer

Enumeration Naming

// ReSharper disable IdentifierTypo, CppUE4CodingStandardNamingViolationWarning
...
// ReSharper enable IdentifierTypo, CppUE4CodingStandardNamingViolationWarning

SonarQube Analysis

SonarQube Cloud

A special thanks to the folks at SonarSource for the free static analysis of the framework, on every commit. ❤️

Tags

We primarily are using a tag based exclusion method when a rule needs to be violated.

// #SONARQUBE-DISABLE-<LANGUAGE>_<RULE> <reason>
...
// #SONARQUBE-ENABLE

Source File Exclusions

  • .github/**
  • SourceAssets/**
  • **/NexusPicker/Private/N*Picker.cpp

Ignore Issues on Multiple Criteria

Rule Key PatternFile Path PatternChoice
cpp:S3471, cpp:S3576**This is a developer choice; where the override and virtual specifiers are used easily identify methods being replaced from the Super. This also matches the practice done in the Unreal Engine codebase.