Skip to content

[PWGDQ] fix linter errors - #17352

Open
aferrero2707 wants to merge 1 commit into
AliceO2Group:masterfrom
aferrero2707:PWGDQ-global-alignment-fix-linter-errors
Open

[PWGDQ] fix linter errors#17352
aferrero2707 wants to merge 1 commit into
AliceO2Group:masterfrom
aferrero2707:PWGDQ-global-alignment-fix-linter-errors

Conversation

@aferrero2707

Copy link
Copy Markdown
Contributor

No description provided.

@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown

O2 linter results: ❌ 0 errors, ⚠️ 55 warnings, 🔕 5 disabled

mcoquet642
mcoquet642 previously approved these changes Aug 6, 2026
@alibuild

alibuild commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator

Error while checking build/O2Physics/code-check for 1682bd4 at 2026-08-06 13:02:

## sw/BUILD/O2Physics-code-check-latest/log
--
========== List of issues found ==========
++ echo 'Found 46 errors and 15 warnings.'
Found 46 errors and 15 warnings.
++ [[ 46 -gt 0 ]]
++ cat /sw/BUILD/df865d246886187dbd75340476e5b506108132bb/O2Physics-code-check/errors.txt
PWGDQ/Tasks/muonGlobalAlignment.cxx:82:10: error: inclusion of deprecated C++ header 'math.h'; consider using 'cmath' instead [modernize-deprecated-headers,-warnings-as-errors]
PWGDQ/Tasks/muonGlobalAlignment.cxx:112:43: error: variable 'sExtrap' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables,-warnings-as-errors]
PWGDQ/Tasks/muonGlobalAlignment.cxx:128:8: error: constructor does not initialize these fields: ccdbManager [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
PWGDQ/Tasks/muonGlobalAlignment.cxx:383:16: error: do not use static_cast to downcast from a base to a derived class; use dynamic_cast instead [cppcoreguidelines-pro-type-static-cast-downcast,-warnings-as-errors]
PWGDQ/Tasks/muonGlobalAlignment.cxx:384:7: error: do not declare C-style arrays, use 'std::array' instead [modernize-avoid-c-arrays,-warnings-as-errors]
PWGDQ/Tasks/muonGlobalAlignment.cxx:385:38: error: do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead [cppcoreguidelines-pro-bounds-array-to-pointer-decay,-warnings-as-errors]
PWGDQ/Tasks/muonGlobalAlignment.cxx:433:15: error: no header providing "o2::conf::ConfigurableParam" is directly included [misc-include-cleaner,-warnings-as-errors]
PWGDQ/Tasks/muonGlobalAlignment.cxx:457:69: error: use designated initializer list to initialize 'AlignmentCorrections' [modernize-use-designated-initializers,-warnings-as-errors]
PWGDQ/Tasks/muonGlobalAlignment.cxx:631:11: error: do not declare C-style arrays, use 'std::array' instead [modernize-avoid-c-arrays,-warnings-as-errors]
PWGDQ/Tasks/muonGlobalAlignment.cxx:632:11: error: do not declare C-style arrays, use 'std::array' instead [modernize-avoid-c-arrays,-warnings-as-errors]
PWGDQ/Tasks/muonGlobalAlignment.cxx:635:9: error: boolean expression can be simplified by DeMorgan's theorem [readability-simplify-boolean-expr,-warnings-as-errors]
PWGDQ/Tasks/muonGlobalAlignment.cxx:652:9: error: boolean expression can be simplified by DeMorgan's theorem [readability-simplify-boolean-expr,-warnings-as-errors]
PWGDQ/Tasks/muonGlobalAlignment.cxx:727:48: error: no header providing "o2::constants::math::PIHalf" is directly included [misc-include-cleaner,-warnings-as-errors]
PWGDQ/Tasks/muonGlobalAlignment.cxx:730:75: error: no header providing "o2::constants::math::PI" is directly included [misc-include-cleaner,-warnings-as-errors]
PWGDQ/Tasks/muonGlobalAlignment.cxx:759:12: error: variable 'alpha1' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]
PWGDQ/Tasks/muonGlobalAlignment.cxx:759:20: error: variable 'alpha3' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]
PWGDQ/Tasks/muonGlobalAlignment.cxx:759:28: error: variable 'alpha4' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]
PWGDQ/Tasks/muonGlobalAlignment.cxx:759:36: error: variable 'x2' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]
PWGDQ/Tasks/muonGlobalAlignment.cxx:759:40: error: variable 'x3' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]
PWGDQ/Tasks/muonGlobalAlignment.cxx:759:44: error: variable 'x4' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]
PWGDQ/Tasks/muonGlobalAlignment.cxx:815:5: error: do not declare C-style arrays, use 'std::array' instead [modernize-avoid-c-arrays,-warnings-as-errors]
PWGDQ/Tasks/muonGlobalAlignment.cxx:816:5: error: do not declare C-style arrays, use 'std::array' instead [modernize-avoid-c-arrays,-warnings-as-errors]
PWGDQ/Tasks/muonGlobalAlignment.cxx:818:57: error: do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead [cppcoreguidelines-pro-bounds-array-to-pointer-decay,-warnings-as-errors]
PWGDQ/Tasks/muonGlobalAlignment.cxx:818:64: error: do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead [cppcoreguidelines-pro-bounds-array-to-pointer-decay,-warnings-as-errors]
PWGDQ/Tasks/muonGlobalAlignment.cxx:819:12: error: avoid repeating the return type from the declaration; use a braced initializer list instead [modernize-return-braced-init-list,-warnings-as-errors]
PWGDQ/Tasks/muonGlobalAlignment.cxx:833:12: error: variable 'alpha1' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]
PWGDQ/Tasks/muonGlobalAlignment.cxx:833:20: error: variable 'alpha3' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]
PWGDQ/Tasks/muonGlobalAlignment.cxx:833:28: error: variable 'alpha4' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]
PWGDQ/Tasks/muonGlobalAlignment.cxx:833:36: error: variable 'x2' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]
PWGDQ/Tasks/muonGlobalAlignment.cxx:833:40: error: variable 'x3' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]
PWGDQ/Tasks/muonGlobalAlignment.cxx:833:44: error: variable 'x4' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]
PWGDQ/Tasks/muonGlobalAlignment.cxx:953:9: error: do not use 'else' after 'break' [readability-else-after-return,-warnings-as-errors]
PWGDQ/Tasks/muonGlobalAlignment.cxx:1019:14: error: redundant boolean literal in conditional return statement [readability-simplify-boolean-expr,-warnings-as-errors]
PWGDQ/Tasks/muonGlobalAlignment.cxx:1303:56: error: no header providing "o2::constants::math::Deg2Rad" is directly included [misc-include-cleaner,-warnings-as-errors]
PWGDQ/Tasks/muonGlobalAlignment.cxx:1475:62: error: no header providing "o2::constants::math::Rad2Deg" is directly included [misc-include-cleaner,-warnings-as-errors]
PWGDQ/Tasks/muonGlobalAlignment.cxx:1480:11: error: uninitialized record type: 'firedLayers' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
PWGDQ/Tasks/muonGlobalAlignment.cxx:1482:17: error: implicit conversion 'unwrap_t<unsigned long>' (aka 'unsigned long') -> 'bool' [readability-implicit-bool-conversion,-warnings-as-errors]
PWGDQ/Tasks/muonGlobalAlignment.cxx:1536:15: error: do not declare C-style arrays, use 'std::array' instead [modernize-avoid-c-arrays,-warnings-as-errors]
PWGDQ/Tasks/muonGlobalAlignment.cxx:1648:7: error: use auto when initializing with new to avoid duplicating the type name [modernize-use-auto,-warnings-as-errors]
PWGDQ/Tasks/muonGlobalAlignment.cxx:1837:17: error: do not declare C-style arrays, use 'std::array' instead [modernize-avoid-c-arrays,-warnings-as-errors]
PWGDQ/Tasks/muonGlobalAlignment.cxx:1839:11: error: do not declare C-style arrays, use 'std::array' instead [modernize-avoid-c-arrays,-warnings-as-errors]
PWGDQ/Tasks/muonGlobalAlignment.cxx:1840:11: error: do not declare C-style arrays, use 'std::array' instead [modernize-avoid-c-arrays,-warnings-as-errors]
[0 more errors; see full log]

Full log here.

@mcoquet642
mcoquet642 disabled auto-merge August 6, 2026 11:36
@mcoquet642
mcoquet642 self-requested a review August 6, 2026 11:37
@aferrero2707

Copy link
Copy Markdown
Contributor Author

@mcoquet642 I will fix the code-check errors and push a new version.

@aferrero2707
aferrero2707 marked this pull request as draft August 6, 2026 12:39
@aferrero2707
aferrero2707 force-pushed the PWGDQ-global-alignment-fix-linter-errors branch 2 times, most recently from 987c8ad to 38d5f2e Compare August 8, 2026 17:22
@aferrero2707
aferrero2707 marked this pull request as ready for review August 8, 2026 17:31
@alibuild

alibuild commented Aug 8, 2026

Copy link
Copy Markdown
Collaborator

Error while checking build/O2Physics/code-check for c94c699 at 2026-08-08 20:31:

++ set -euo pipefail
++ [[ -d /sw/slc9_x86-64/Clang/v20.1.7-23 ]]
+++ realpath /sw/BUILD/463ba71d47a233f8dc3facd7bb13a89d46d72056/O2Physics-code-check/../../O2Physics-latest/O2Physics
++ O2PHYSICS_BUILDDIR=/sw/BUILD/d9382760054d0b26b0771bd243406ec4b3cc6fbd/O2Physics
++ cp /sw/BUILD/d9382760054d0b26b0771bd243406ec4b3cc6fbd/O2Physics/compile_commands.json .
+++ python3 -c 'import json, os; print(os.path.commonpath([x["file"] for x in json.loads(open("compile_commands.json").read()) if "sw/BUILD" not in x["file"] and "G__" not in x["file"] and x["file"].endswith(".cxx")]))'
++ O2PHYSICS_SRC=/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0
++ pushd /sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0
/sw/SPECS/slc9_x86-64/O2Physics-code-check/1.0-local537/O2Physics-code-check.sh: line 16: pushd: /sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0: No such file or directory

Full log here.

@aferrero2707
aferrero2707 force-pushed the PWGDQ-global-alignment-fix-linter-errors branch from c94c699 to 5f8deec Compare August 8, 2026 19:15
@alibuild

alibuild commented Aug 8, 2026

Copy link
Copy Markdown
Collaborator

Error while checking build/O2Physics/code-check for 5f8deec at 2026-08-08 23:48:

## sw/BUILD/O2Physics-code-check-latest/log
--
========== List of issues found ==========
++ echo 'Found 6 errors and 15 warnings.'
Found 6 errors and 15 warnings.
++ [[ 6 -gt 0 ]]
++ cat /sw/BUILD/78df2ff399cc953778643a837353c79b16261f3c/O2Physics-code-check/errors.txt
PWGDQ/Tasks/muonGlobalAlignment.cxx:42:1: error: included header MatchGlobalFwd.h is not used directly [misc-include-cleaner,-warnings-as-errors]
PWGDQ/Tasks/muonGlobalAlignment.cxx:384:16: error: do not use static_cast to downcast from a base to a derived class; use dynamic_cast instead [cppcoreguidelines-pro-type-static-cast-downcast,-warnings-as-errors]
PWGDQ/Tasks/muonGlobalAlignment.cxx:816:11: error: do not declare C-style arrays, use 'std::array' instead [modernize-avoid-c-arrays,-warnings-as-errors]
PWGDQ/Tasks/muonGlobalAlignment.cxx:817:11: error: do not declare C-style arrays, use 'std::array' instead [modernize-avoid-c-arrays,-warnings-as-errors]
PWGDQ/Tasks/muonGlobalAlignment.cxx:819:57: error: do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead [cppcoreguidelines-pro-bounds-array-to-pointer-decay,-warnings-as-errors]
PWGDQ/Tasks/muonGlobalAlignment.cxx:819:64: error: do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead [cppcoreguidelines-pro-bounds-array-to-pointer-decay,-warnings-as-errors]
++ [[ 15 -gt 0 ]]
++ cat /sw/BUILD/78df2ff399cc953778643a837353c79b16261f3c/O2Physics-code-check/warnings.txt
PWGDQ/Tasks/muonGlobalAlignment.cxx:288:38: warning: statement should be inside braces [readability-braces-around-statements]
PWGDQ/Tasks/muonGlobalAlignment.cxx:293:55: warning: statement should be inside braces [readability-braces-around-statements]
PWGDQ/Tasks/muonGlobalAlignment.cxx:352:37: warning: statement should be inside braces [readability-braces-around-statements]
PWGDQ/Tasks/muonGlobalAlignment.cxx:373:38: warning: statement should be inside braces [readability-braces-around-statements]
PWGDQ/Tasks/muonGlobalAlignment.cxx:981:35: warning: statement should be inside braces [readability-braces-around-statements]
PWGDQ/Tasks/muonGlobalAlignment.cxx:985:45: warning: statement should be inside braces [readability-braces-around-statements]
PWGDQ/Tasks/muonGlobalAlignment.cxx:1035:35: warning: statement should be inside braces [readability-braces-around-statements]
PWGDQ/Tasks/muonGlobalAlignment.cxx:1440:66: warning: statement should be inside braces [readability-braces-around-statements]
PWGDQ/Tasks/muonGlobalAlignment.cxx:1467:26: warning: statement should be inside braces [readability-braces-around-statements]
PWGDQ/Tasks/muonGlobalAlignment.cxx:1587:27: warning: statement should be inside braces [readability-braces-around-statements]
PWGDQ/Tasks/muonGlobalAlignment.cxx:1694:66: warning: statement should be inside braces [readability-braces-around-statements]
PWGDQ/Tasks/muonGlobalAlignment.cxx:1707:25: warning: statement should be inside braces [readability-braces-around-statements]
PWGDQ/Tasks/muonGlobalAlignment.cxx:1711:24: warning: statement should be inside braces [readability-braces-around-statements]
PWGDQ/Tasks/muonGlobalAlignment.cxx:1715:52: warning: statement should be inside braces [readability-braces-around-statements]
PWGDQ/Tasks/muonGlobalAlignment.cxx:1738:56: warning: statement should be inside braces [readability-braces-around-statements]
++ [[ 6 -gt 0 ]]
++ exit 1
--

Full log here.

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.

3 participants