Skip to content

[DPG] Fix cpplint errors - #18096

Merged
vkucera merged 1 commit into
AliceO2Group:masterfrom
vkucera:cpplint-safe-DPG
Sep 30, 2026
Merged

vkucera merged 1 commit into
AliceO2Group:masterfrom
vkucera:cpplint-safe-DPG

Conversation

@vkucera

@vkucera vkucera commented Sep 29, 2026

Copy link
Copy Markdown
Collaborator

Fixes errors from the following categories:

  • readability/inheritance
  • readability/braces
  • readability/multiline_comment
  • whitespace/newline
  • whitespace/empty_if_body
  • build/include_what_you_use
  • build/header_guard

Fixes errors from the following categories:

- `readability/inheritance`
- `readability/braces`
- `readability/multiline_comment`
- `whitespace/newline`
- `whitespace/empty_if_body`
- `build/include_what_you_use`
- `build/header_guard`
@github-actions github-actions Bot added the dpg label Sep 29, 2026
@github-actions github-actions Bot changed the title Fix cpplint errors [DPG] Fix cpplint errors Sep 29, 2026
@github-actions

Copy link
Copy Markdown

O2 linter results: ❌ 0 errors, ⚠️ 146 warnings, 🔕 60 disabled

@vkucera
vkucera marked this pull request as ready for review September 29, 2026 12:02
@alibuild

Copy link
Copy Markdown
Collaborator

Error while checking build/O2Physics/code-check for 4a41e34 at 2026-09-29 18:35:

## sw/BUILD/O2Physics-code-check-latest/log
--
========== List of issues found ==========
++ echo 'Found 1 errors and 190 warnings.'
Found 1 errors and 190 warnings.
++ [[ 1 -gt 0 ]]
++ cat /sw/BUILD/67057709f1a11730068006262e059ffbc931c0b1/O2Physics-code-check/errors.txt
DPG/Tasks/AOTEvent/detectorOccupancyQa.cxx:457:7: error: 'push_back' is called inside a loop; consider pre-allocating the container capacity before the loop [performance-inefficient-vector-operation,-warnings-as-errors]
++ [[ 190 -gt 0 ]]
++ cat /sw/BUILD/67057709f1a11730068006262e059ffbc931c0b1/O2Physics-code-check/warnings.txt
DPG/Tasks/AOTEvent/detectorOccupancyQa.cxx:56:8: warning: constructor does not initialize these fields: ccdb, nOrbits, minOrbit [cppcoreguidelines-pro-type-member-init]
DPG/Tasks/AOTEvent/detectorOccupancyQa.cxx:165:30: warning: do not use reinterpret_cast [cppcoreguidelines-pro-type-reinterpret-cast]
DPG/Tasks/AOTEvent/detectorOccupancyQa.cxx:165:30: warning: redundant explicit casting to the same type 'TAxis *' as the sub-expression, remove this casting [readability-redundant-casting]
DPG/Tasks/AOTEvent/detectorOccupancyQa.cxx:186:20: warning: narrowing conversion from 'double' to 'int' [bugprone-narrowing-conversions]
DPG/Tasks/AOTEvent/detectorOccupancyQa.cxx:414:19: warning: narrowing conversion from 'float' to 'int' [bugprone-narrowing-conversions]
DPG/Tasks/AOTEvent/detectorOccupancyQa.cxx:415:32: warning: narrowing conversion from 'float' to 'int' [bugprone-narrowing-conversions]
DPG/Tasks/AOTEvent/detectorOccupancyQa.cxx:418:21: warning: narrowing conversion from 'float' to 'int' [bugprone-narrowing-conversions]
DPG/Tasks/AOTEvent/detectorOccupancyQa.cxx:456:60: warning: statement should be inside braces [readability-braces-around-statements]
DPG/Tasks/AOTEvent/detectorOccupancyQa.cxx:603:56: warning: implicit conversion 'int' -> 'bool' [readability-implicit-bool-conversion]
DPG/Tasks/AOTEvent/detectorOccupancyQa.cxx:614:60: warning: implicit conversion 'int' -> 'bool' [readability-implicit-bool-conversion]
DPG/Tasks/AOTEvent/detectorOccupancyQa.cxx:615:61: warning: implicit conversion 'int' -> 'bool' [readability-implicit-bool-conversion]
DPG/Tasks/AOTEvent/detectorOccupancyQa.cxx:640:53: warning: statement should be inside braces [readability-braces-around-statements]
DPG/Tasks/AOTEvent/detectorOccupancyQa.cxx:643:26: warning: implicit conversion 'bool' -> 'int' [readability-implicit-bool-conversion]
DPG/Tasks/AOTEvent/detectorOccupancyQa.cxx:644:23: warning: implicit conversion 'bool' -> 'int' [readability-implicit-bool-conversion]
DPG/Tasks/AOTEvent/detectorOccupancyQa.cxx:646:86: warning: statement should be inside braces [readability-braces-around-statements]
DPG/Tasks/AOTEvent/detectorOccupancyQa.cxx:648:102: warning: statement should be inside braces [readability-braces-around-statements]
DPG/Tasks/AOTEvent/detectorOccupancyQa.cxx:652:35: warning: implicit conversion 'bool' -> 'int' [readability-implicit-bool-conversion]
DPG/Tasks/AOTEvent/detectorOccupancyQa.cxx:653:35: warning: implicit conversion 'bool' -> 'int' [readability-implicit-bool-conversion]
DPG/Tasks/AOTEvent/detectorOccupancyQa.cxx:655:53: warning: statement should be inside braces [readability-braces-around-statements]
DPG/Tasks/AOTEvent/detectorOccupancyQa.cxx:657:35: warning: implicit conversion 'bool' -> 'int' [readability-implicit-bool-conversion]
DPG/Tasks/AOTEvent/detectorOccupancyQa.cxx:659:29: warning: implicit conversion 'bool' -> 'int' [readability-implicit-bool-conversion]
DPG/Tasks/AOTEvent/detectorOccupancyQa.cxx:668:29: warning: statement should be inside braces [readability-braces-around-statements]
DPG/Tasks/AOTEvent/detectorOccupancyQa.cxx:688:159: warning: redundant boolean literal in ternary expression result [readability-simplify-boolean-expr]
DPG/Tasks/AOTEvent/detectorOccupancyQa.cxx:691:44: warning: implicit conversion 'int' -> 'bool' [readability-implicit-bool-conversion]
DPG/Tasks/AOTEvent/detectorOccupancyQa.cxx:691:78: warning: implicit conversion 'bool' -> 'int' [readability-implicit-bool-conversion]
DPG/Tasks/AOTEvent/detectorOccupancyQa.cxx:720:30: warning: statement should be inside braces [readability-braces-around-statements]
DPG/Tasks/AOTEvent/detectorOccupancyQa.cxx:725:51: warning: statement should be inside braces [readability-braces-around-statements]
DPG/Tasks/AOTEvent/detectorOccupancyQa.cxx:729:42: warning: statement should be inside braces [readability-braces-around-statements]
DPG/Tasks/AOTEvent/detectorOccupancyQa.cxx:741:30: warning: statement should be inside braces [readability-braces-around-statements]
DPG/Tasks/AOTEvent/detectorOccupancyQa.cxx:746:41: warning: statement should be inside braces [readability-braces-around-statements]
DPG/Tasks/AOTEvent/detectorOccupancyQa.cxx:763:46: warning: statement should be inside braces [readability-braces-around-statements]
DPG/Tasks/AOTEvent/detectorOccupancyQa.cxx:767:47: warning: statement should be inside braces [readability-braces-around-statements]
DPG/Tasks/AOTEvent/detectorOccupancyQa.cxx:771:90: warning: statement should be inside braces [readability-braces-around-statements]
DPG/Tasks/AOTEvent/detectorOccupancyQa.cxx:775:50: warning: statement should be inside braces [readability-braces-around-statements]
DPG/Tasks/AOTEvent/detectorOccupancyQa.cxx:779:51: warning: statement should be inside braces [readability-braces-around-statements]
DPG/Tasks/AOTEvent/detectorOccupancyQa.cxx:789:25: warning: statement should be inside braces [readability-braces-around-statements]
DPG/Tasks/AOTEvent/detectorOccupancyQa.cxx:833:55: warning: statement should be inside braces [readability-braces-around-statements]
DPG/Tasks/AOTEvent/detectorOccupancyQa.cxx:836:49: warning: statement should be inside braces [readability-braces-around-statements]
DPG/Tasks/AOTEvent/detectorOccupancyQa.cxx:842:25: warning: statement should be inside braces [readability-braces-around-statements]
[0 more errors; see full log]

Full log here.

@vkucera

vkucera commented Sep 30, 2026

Copy link
Copy Markdown
Collaborator Author

Trivial. Merging.

@vkucera
vkucera merged commit 20c5eef into AliceO2Group:master Sep 30, 2026
11 of 13 checks passed
@vkucera
vkucera deleted the cpplint-safe-DPG branch September 30, 2026 12:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

2 participants