File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed
Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change 1+ #!/bin/awk -f
2+
3+ # Fix include style.
4+ # NB: Run before sorting.
5+
6+ {
7+ if ($1 ~ /^ #include /) {
8+ h = substr ($2 , 2 , length ($2 ) - 2 )
9+ if ( h ~ /^ (PWG[A -Z ]{2 } | Common| ALICE3| DPG| EventFiltering| Tools| Tutorials)\/ . * \. h / ) { $2 = " \" " h" \" " } # O2Physics
10+ else if ( h ~ /^ (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 / ) { $2 = " <" h" >" } # O2
11+ else if ( h ~ /^ (T[A -Z ]| Math\/ | Roo[A -Z ])[[:alnum :] \/ ]+ \. h / ) { $2 = " <" h" >" } # ROOT
12+ else if ( h ~ /^ KF[A -Z ][[:alnum :] ]+ \. h / ) { $2 = " <" h" >" } # KFParticle
13+ else if ( h ~ /^ (fastjet\/ | onnxruntime) / ) { $2 = " <" h" >" } # FastJet, ONNX
14+ else if ( h ~ /^ . * DataModel\/ / ) { $2 = " \" " h" \" " } # incomplete path to DataModel
15+ else if ( h ~ /^ ([[:alnum :] _ ]+ \/ )+ [[:alnum :] _ ]+ \. h / ) { $2 = " <" h" >" } # other third-party
16+ else if ( $2 ~ /^ ". * \. / ) { } # other local-looking file
17+ else if ( h ~ /^ [[:lower :] _ ]+ \. h / ) { $2 = " <" h" >" } # C system
18+ else if ( h ~ /^ [[:lower :] _ \/ ]+ / ) { $2 = " <" h" >" } # C++ system
19+ }
20+ print
21+ }
You can’t perform that action at this time.
0 commit comments