Skip to content

Commit e08dc99

Browse files
committed
Merge remote-tracking branch 'origin/master'
2 parents 6de2e04 + 5e361d8 commit e08dc99

File tree

683 files changed

+78421
-34690
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

683 files changed

+78421
-34690
lines changed

.clang-format

Lines changed: 54 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,60 @@ PenaltyBreakFirstLessLess: 120
3939
PenaltyBreakString: 1000
4040
PenaltyExcessCharacter: 1000000
4141
PenaltyReturnTypeOnItsOwnLine: 200
42-
SortIncludes: false
42+
SortIncludes: CaseSensitive
43+
IncludeBlocks: Regroup
44+
IncludeCategories:
45+
# O2Physics, PWG
46+
- Regex: ^(<|")PWG[A-Z]{2}/.*\.h
47+
Priority: 2
48+
CaseSensitive: true
49+
# O2Physics, non-PWG
50+
- Regex: ^(<|")(Common|ALICE3|DPG|EventFiltering|Tools|Tutorials)/.*\.h
51+
Priority: 3
52+
CaseSensitive: true
53+
# O2
54+
- Regex: ^(<|")(Algorithm|CCDB|Common[A-Z]|DataFormats|DCAFitter|Detectors|EMCAL|Field|Framework|FT0|FV0|GlobalTracking|ITS|MathUtils|MFT|MCH|MID|PHOS|PID|ReconstructionDataFormats|SimulationDataFormat|TOF|TPC|ZDC).*/.*\.h
55+
Priority: 4
56+
CaseSensitive: true
57+
# ROOT
58+
- Regex: ^(<|")(T[A-Z]|Math/|Roo[A-Z])[[:alnum:]/]+\.h
59+
Priority: 5
60+
CaseSensitive: true
61+
# known third-party: KFParticle
62+
- Regex: ^(<|")KF[A-Z][[:alnum:]]+\.h
63+
Priority: 6
64+
CaseSensitive: true
65+
# known third-party: FastJet
66+
- Regex: ^(<|")fastjet/
67+
Priority: 6
68+
CaseSensitive: true
69+
# known third-party: ONNX runtime
70+
- Regex: ^(<|")onnxruntime
71+
Priority: 6
72+
CaseSensitive: true
73+
# incomplete path to DataModel
74+
- Regex: ^(<|").*DataModel/
75+
Priority: 1
76+
CaseSensitive: true
77+
# other third-party
78+
- Regex: ^(<|")([[:alnum:]_]+/)+[[:alnum:]_]+\.h
79+
Priority: 6
80+
CaseSensitive: true
81+
# other local-looking file
82+
- Regex: ^".*\.
83+
Priority: 1
84+
CaseSensitive: true
85+
# C system
86+
- Regex: ^(<|")[[:lower:]_]+\.h(>|")
87+
Priority: 102
88+
CaseSensitive: true
89+
# C++ system
90+
- Regex: ^(<|")[[:lower:]_/]+(>|")
91+
Priority: 101
92+
CaseSensitive: true
93+
# rest
94+
- Regex: .*
95+
Priority: 100
4396
SpaceBeforeAssignmentOperators: true
4497
SpaceBeforeParens: ControlStatements
4598
SpaceInEmptyParentheses: false

.git-blame-ignore-revs

Whitespace-only changes.

.github/workflows/mega-linter.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
id: ml
3939
# You can override MegaLinter flavor used to have faster performances
4040
# More info at https://megalinter.io/flavors/
41-
uses: oxsecurity/megalinter@v8.5.0
41+
uses: oxsecurity/megalinter@v8.7.0
4242
env:
4343
# All available variables are described in documentation:
4444
# https://megalinter.io/configuration/

.github/workflows/o2-linter.yml

Lines changed: 32 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
# Find issues in O2 code
33
name: O2 linter
44

5-
'on': [pull_request, push]
5+
"on": [pull_request_target, push]
66
permissions: {}
77
env:
8-
MAIN_BRANCH: master
8+
BRANCH_MAIN: master
99

1010
concurrency:
1111
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
@@ -15,20 +15,47 @@ jobs:
1515
o2-linter:
1616
name: O2 linter
1717
runs-on: ubuntu-24.04
18+
permissions:
19+
pull-requests: write
1820
steps:
21+
- name: Set branches
22+
run: |
23+
if [[ "${{ github.event_name }}" == "push" ]]; then
24+
branch_head="${{ github.ref }}"
25+
branch_base="${{ env.BRANCH_MAIN }}"
26+
else
27+
branch_head="refs/pull/${{ github.event.pull_request.number }}/merge"
28+
branch_base="${{ github.event.pull_request.base.ref }}"
29+
fi
30+
echo BRANCH_HEAD="$branch_head" >> "$GITHUB_ENV"
31+
echo BRANCH_BASE="$branch_base" >> "$GITHUB_ENV"
1932
- name: Checkout Code
2033
uses: actions/checkout@v4
2134
with:
35+
ref: ${{ env.BRANCH_HEAD }}
2236
fetch-depth: 0 # needed to get the full history
2337
- name: Run tests
38+
id: linter
2439
run: |
25-
# Diff against the common ancestor of the source branch and the main branch.
26-
readarray -t files < <(git diff --diff-filter d --name-only origin/${{ env.MAIN_BRANCH }}...)
40+
# Diff against the common ancestor of the source (head) branch and the target (base) branch.
41+
echo "Diffing ${{ env.BRANCH_HEAD }} against ${{ env.BRANCH_BASE }}."
42+
readarray -t files < <(git diff --diff-filter d --name-only origin/${{ env.BRANCH_BASE }}...)
2743
if [ ${#files[@]} -eq 0 ]; then
2844
echo "::notice::No files to lint."
45+
echo "linter_ran=0" >> "$GITHUB_OUTPUT"
2946
exit 0
3047
fi
31-
[ ${{ github.event_name }} == 'pull_request' ] && options="-g"
48+
echo "linter_ran=1" >> "$GITHUB_OUTPUT"
49+
[[ "${{ github.event_name }}" == "pull_request_target" ]] && options="-g"
3250
# shellcheck disable=SC2086 # Ignore unquoted options.
3351
python3 Scripts/o2_linter.py $options "${files[@]}"
3452
echo "Tip: If you allow actions in your fork repository, O2 linter will run when you push commits."
53+
- name: Comment PR
54+
if: (success() || failure()) && (github.event_name == 'pull_request_target' && steps.linter.outputs.linter_ran == 1)
55+
uses: thollander/actions-comment-pull-request@v3
56+
with:
57+
comment-tag: o2-linter
58+
message: "**O2 linter results:**
59+
❌ ${{ steps.linter.outputs.n_issues }} errors,
60+
⚠️ ${{ steps.linter.outputs.n_tolerated }} warnings,
61+
🔕 ${{ steps.linter.outputs.n_disabled }} disabled"

.mega-linter.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,5 @@ PYTHON_PYRIGHT_CONFIG_FILE: pyproject.toml
3939
PYTHON_RUFF_CONFIG_FILE: pyproject.toml
4040
CPP_CPPLINT_FILE_EXTENSIONS: [".C", ".c", ".c++", ".cc", ".cl", ".cpp", ".cu", ".cuh", ".cxx", ".cxx.in", ".h", ".h++", ".hh", ".h.in", ".hpp", ".hxx", ".inc", ".inl", ".macro"]
4141
CPP_CLANG_FORMAT_FILE_EXTENSIONS: [".C", ".c", ".c++", ".cc", ".cl", ".cpp", ".cu", ".cuh", ".cxx", ".cxx.in", ".h", ".h++", ".hh", ".h.in", ".hpp", ".hxx", ".inc", ".inl", ".macro"]
42+
CPP_CPPCHECK_ARGUMENTS: --language=c++ --std=c++20 --check-level=exhaustive --suppressions-list=cppcheck_config
4243
REPOSITORY_GITLEAKS_PR_COMMITS_SCAN: true

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ repos:
77
- id: trailing-whitespace
88
- id: end-of-file-fixer
99
- repo: https://github.com/pre-commit/mirrors-clang-format
10-
rev: v18.1.3 # clang-format version
10+
rev: v20.1.5 # clang-format version
1111
hooks:
1212
- id: clang-format
1313
- repo: https://github.com/cpplint/cpplint
14-
rev: 2.0.0
14+
rev: 2.0.2
1515
hooks:
1616
- id: cpplint

ALICE3/Core/CMakeLists.txt

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,25 @@
1212
o2physics_add_library(ALICE3Core
1313
SOURCES TOFResoALICE3.cxx
1414
DelphesO2TrackSmearer.cxx
15-
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore)
15+
PUBLIC_LINK_LIBRARIES O2::Framework
16+
O2Physics::AnalysisCore)
1617

1718
o2physics_target_root_dictionary(ALICE3Core
1819
HEADERS TOFResoALICE3.h
20+
TrackUtilities.h
1921
DelphesO2TrackSmearer.h
2022
LINKDEF ALICE3CoreLinkDef.h)
2123

2224
o2physics_add_library(FastTracker
2325
SOURCES FastTracker.cxx
24-
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore)
26+
DetLayer.cxx
27+
DelphesO2LutWriter.cxx
28+
PUBLIC_LINK_LIBRARIES O2::Framework
29+
O2Physics::AnalysisCore
30+
O2Physics::ALICE3Core)
2531

2632
o2physics_target_root_dictionary(FastTracker
2733
HEADERS FastTracker.h
34+
DetLayer.h
35+
DelphesO2LutWriter.h
2836
LINKDEF FastTrackerLinkDef.h)

0 commit comments

Comments
 (0)