Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file.
3 changes: 3 additions & 0 deletions PWGJE/o2linter_config
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
name/function-variable
name/configurable
doc/file
2 changes: 1 addition & 1 deletion PWGUD/Core/SGTrackSelector.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.

Check failure on line 1 in PWGUD/Core/SGTrackSelector.h

View workflow job for this annotation

GitHub Actions / O2 linter

[doc/file]

Provide mandatory file documentation.
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
// All rights not expressly granted are reserved.
//
Expand All @@ -8,7 +8,7 @@
// In applying this license CERN does not waive the privileges and immunities
// granted to it by virtue of its status as an Intergovernmental Organization
// or submit itself to any jurisdiction.
//

Check failure on line 11 in PWGUD/Core/SGTrackSelector.h

View workflow job for this annotation

GitHub Actions / O2 linter

[doc/file]

Documentation for \author is missing, incorrect or misplaced.

Check failure on line 11 in PWGUD/Core/SGTrackSelector.h

View workflow job for this annotation

GitHub Actions / O2 linter

[doc/file]

Documentation for \brief is missing, incorrect or misplaced.

Check failure on line 11 in PWGUD/Core/SGTrackSelector.h

View workflow job for this annotation

GitHub Actions / O2 linter

[doc/file]

Documentation for \file is missing, incorrect or misplaced.
// \Single Gap Event Analyzer
// \author Sasha Bylinkin, alexander.bylinkin@gmail.com
// \since April 2023
Expand All @@ -26,15 +26,15 @@
#include "PWGUD/Core/SGSelector.h"
#include <TString.h>
#include "TVector3.h"
using namespace std;

Check failure on line 29 in PWGUD/Core/SGTrackSelector.h

View workflow job for this annotation

GitHub Actions / O2 linter

[using-directive]

Do not put using directives at global scope in headers.
using namespace o2;

Check failure on line 30 in PWGUD/Core/SGTrackSelector.h

View workflow job for this annotation

GitHub Actions / O2 linter

[using-directive]

Do not put using directives at global scope in headers.
using namespace o2::aod;

Check failure on line 31 in PWGUD/Core/SGTrackSelector.h

View workflow job for this annotation

GitHub Actions / O2 linter

[using-directive]

Do not put using directives at global scope in headers.
using namespace o2::framework;

Check failure on line 32 in PWGUD/Core/SGTrackSelector.h

View workflow job for this annotation

GitHub Actions / O2 linter

[using-directive]

Do not put using directives at global scope in headers.
using namespace o2::framework::expressions;

Check failure on line 33 in PWGUD/Core/SGTrackSelector.h

View workflow job for this annotation

GitHub Actions / O2 linter

[using-directive]

Do not put using directives at global scope in headers.
template <typename T>
int trackselector(const T& track, const std::vector<float>& params)
{
// Ensure the params vector contains all the necessary parameters
// Ensure the params vector contains all the necessary parameters//

if (params.size() < 8) {
throw std::runtime_error("Insufficient parameters provided");
Expand All @@ -46,7 +46,7 @@
if (std::abs(track.dcaZ()) > params[1])
return 0;
if (!params[2]) {
if (std::abs(track.dcaXY()) > .0105 + .035 / pow(a.Pt(), 1.1))

Check failure on line 49 in PWGUD/Core/SGTrackSelector.h

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
return 0;
} else {
if (std::abs(track.dcaXY()) > params[2])
Expand Down
1 change: 1 addition & 0 deletions PWGUD/Core/o2linter_config
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
magic-number
4 changes: 2 additions & 2 deletions Scripts/o2_linter.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ def get_tolerated_tests(path: str) -> "list[str]":
if path_tests.is_file():
with path_tests.open() as content:
tests = [line.strip() for line in content.readlines() if line.strip()]
print(f"{path}:0: info: Tolerating tests from {path_tests}. {tests}")
print(f"{path}:1: info: Tolerating tests from {path_tests}. {tests}")
break
return tests

Expand Down Expand Up @@ -249,7 +249,7 @@ def is_disabled(self, line: str, prefix_comment="//") -> bool:
def print_error(self, path: str, line: Union[int, None], message: str):
"""Format and print error message."""
# return # Use to suppress error messages.
line = line or 0
line = line or 1
# terminal format
print(f"{path}:{line}: {message_levels[self.severity_current]}: {message} [{self.name}]")
if github_mode and not self.tolerated: # Annotate only not tolerated issues.
Expand Down
Loading