Skip to content

[Style]: missing brackets in single line if condition #899

@SYaoJun

Description

@SYaoJun

Background

A large number of single-line if conditions omit curly braces — this is an error-prone coding style. To avoid setting a poor example and eliminate potential bugs, we should correct these instances proactively.

Methods

Enabling the readability-braces-around-statements check in .clang-tidy, then run clang-tidy will highlight all relevant warnings. We can then address these issues one by one.

Component(s)

C++, Format

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions