Skip to content

Clang format check failures due to an upgrade in Clang-format version #2268

@tangxifan

Description

@tangxifan

Expected Behaviour

The code format check is essential to enforce coding convention, as well as to make sure that code review focus on necessary changes only.

Current Behaviour

However, due to a must-have upgrade in clang-format version (PR #2258), the code format check failed.
The root of the cause is that even using the configuration file .clang-format, the clang-format-14 (default clang version on Ubuntu 22.04 LTS) apply code formatting differently than the previous version clang-format-7.
Detailed error log can be found at
5_Test.txt

Possible Solution

There are two ways to resolve the issue:

  • Update codes w.r.t. the latest clang-format-14 results. This is straightforward but may impact some PRs which are modifying the codes which are conflicted with format results.
  • Update .clang-format, which could be time consuming but have less impact on other PRs.

Steps to Reproduce

  1. Git clone on the current master
  2. Run code format by
./dev/check-format.sh

Context

Your Environment

  • VTR revision used: ab2e17f
  • Operating System and version: Ubuntu 22.04 LTS
  • Compiler version: Clang-format-14

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions