Skip to content

Run C++ code formatter in 3 folders#264

Open
LorantLipcsei-ETAS wants to merge 2 commits into
eclipse-score:mainfrom
etas-contrib:feature/AZB-98344-run_cpp_code_formatter_1
Open

Run C++ code formatter in 3 folders#264
LorantLipcsei-ETAS wants to merge 2 commits into
eclipse-score:mainfrom
etas-contrib:feature/AZB-98344-run_cpp_code_formatter_1

Conversation

@LorantLipcsei-ETAS

Copy link
Copy Markdown
Contributor

Run C++ code formatter in 3 folders :

  • examples
  • score/health_monitor
  • tests

- examples
- score/health_monitor
- tests
@github-actions

github-actions Bot commented Jun 25, 2026

Copy link
Copy Markdown

License Check Results

🚀 The license check job ran with the Bazel command:

bazel run --lockfile_mode=error //:license-check

Status: ⚠️ Needs Review

Click to expand output
[License Check Output]
Extracting Bazel installation...
Starting local Bazel server (8.4.2) and connecting to it...
INFO: Invocation ID: a504881a-2db7-4ff5-ad1c-e7c94c1f90c8
Computing main repo mapping: 
Computing main repo mapping: 
Loading: 
Loading: 0 packages loaded
Loading: 0 packages loaded
Loading: 0 packages loaded
    currently loading: 
Loading: 0 packages loaded
    currently loading: 
Loading: 0 packages loaded
    currently loading: 
Analyzing: target //:license-check (1 packages loaded, 0 targets configured)
Analyzing: target //:license-check (1 packages loaded, 0 targets configured)

Analyzing: target //:license-check (30 packages loaded, 10 targets configured)

Analyzing: target //:license-check (85 packages loaded, 10 targets configured)

Analyzing: target //:license-check (125 packages loaded, 327 targets configured)

Analyzing: target //:license-check (146 packages loaded, 5411 targets configured)

Analyzing: target //:license-check (146 packages loaded, 8031 targets configured)

Analyzing: target //:license-check (151 packages loaded, 8083 targets configured)

Analyzing: target //:license-check (158 packages loaded, 8130 targets configured)

Analyzing: target //:license-check (158 packages loaded, 8130 targets configured)

Analyzing: target //:license-check (158 packages loaded, 8130 targets configured)

Analyzing: target //:license-check (160 packages loaded, 8134 targets configured)

Analyzing: target //:license-check (161 packages loaded, 10018 targets configured)

Analyzing: target //:license-check (162 packages loaded, 10142 targets configured)

INFO: Analyzed target //:license-check (163 packages loaded, 10268 targets configured).
[12 / 16] JavaToolchainCompileClasses external/rules_java+/toolchains/platformclasspath_classes; 0s disk-cache, processwrapper-sandbox ... (2 actions running)
[14 / 16] JavaToolchainCompileBootClasspath external/rules_java+/toolchains/platformclasspath.jar; 0s disk-cache, processwrapper-sandbox
INFO: Found 1 target...
Target //:license.check.license_check up-to-date:
  bazel-bin/license.check.license_check
  bazel-bin/license.check.license_check.jar
INFO: Elapsed time: 26.342s, Critical Path: 2.87s
INFO: 16 processes: 12 internal, 3 processwrapper-sandbox, 1 worker.
INFO: Build completed successfully, 16 total actions
INFO: Running command line: bazel-bin/license.check.license_check ./formatted.txt <args omitted>
usage: org.eclipse.dash.licenses.cli.Main [-batch <int>] [-cd <url>]
       [-confidence <int>] [-ef <url>] [-excludeSources <sources>] [-help] [-lic
       <url>] [-project <shortname>] [-repo <url>] [-review] [-summary <file>]
       [-timeout <seconds>] [-token <token>]

@github-actions

Copy link
Copy Markdown

The created documentation from the pull request is available at: docu-html

Comment thread .clang-format Outdated
Priority: 1
IndentWidth: 4
InsertNewlineAtEOF: true
# InsertNewlineAtEOF: true

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why was this commented out?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed it because that line gave an unknown attribute error and searching for it revealed that this was encountered by others as well due to usually outdated clang-format ( under version 12, but ours is above 14 ).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shall not be done. Thats not our problem - one need to use correct clang format.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devcontainer uses clang-format version 20.1.8 and the .clang-format file works for this version. So I also think this change has to be reverted.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will fix this and revert the change in the .clang-format file.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reverted the change in the .clang-format file and re-ran the formatting using clang-format 20.1.8.

@pawelrutkaq pawelrutkaq left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shall we integrate eclipse-score/tooling#294. since if we have formatting errors now, does CI job detect formatting issues ? If not, we shall fix CI too with this PR.

@NicolasFussberger

Copy link
Copy Markdown
Contributor

Shall we integrate eclipse-score/tooling#294. since if we have formatting errors now, does CI job detect formatting issues ? If not, we shall fix CI too with this PR.

I think this would be good to use. Otherwise formatting will diverge again and again if this is not being enforced.

Fixed .clang-format file
Re-run the formatting with clang-format 20.1.8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

3 participants