rticommunity / rticommunity/rticonnextdds-examples

clang-format doesn't work with C/C++

Open
#415 1 comment 0 reactions 0 assignees View on GitHub

A pull request for this has already been merged.

  • #416 by @ManuelJNunez — merged
Dominant language
Python
Stars
148
Forks
153
PR merge metrics
No merged PRs in 30d

Description

Information
  • RTI Product: N/A
  • Version: N/A
  • Operating system: N/A
  • Compiler: N/A
  • Compiler version: N/A
  • Additional information: N/A
What is the current behavior?

I get this message when I run clang-format for C/C++ source files:

================================= C/C++ & Java ================================
Checking C/C++ & Java files format with clang-format: ['examples/connext_dds/custom_transport/c/FileTransport.c', 'examples/connext_dds/flat_data_api/c++98/CameraImage_subscriber.cxx', 'examples/connext_dds/logging_config/c/logging_publisher.c']
Configuration file(s) do(es) not support C++: /home/runner/work/rticonnextdds-examples/rticonnextdds-examples/.clang-format
error: `clang-format -lines=1485:1489 -lines=1505:1510 -lines=1555:1562 -assume-filename=examples/connext_dds/custom_transport/c/FileTransport.c` failed
Error: Process completed with exit code 1.
Suggested solutions

Separate the Java and C/C++ clang-format rules.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the repository's .clang-format configuration and the clang-format check output for the listed C/C++ files. Separate the Java and C/C++ formatting rules, then rerun the formatter check and confirm the listed files no longer fail.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, cpp
Domain
tooling
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.