Skip to content

[ci] Fail CI if missing override instead of just warning #19092

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
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
4 changes: 2 additions & 2 deletions .github/workflows/root-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ jobs:
is_special: true
- image: alma8
- image: alma9
overrides: ["CMAKE_BUILD_TYPE=Debug", "CMAKE_CXX_FLAGS=-Wsuggest-override"]
overrides: ["CMAKE_BUILD_TYPE=Debug"]
- image: alma10
- image: ubuntu22
overrides: ["imt=Off", "CMAKE_BUILD_TYPE=Debug"]
Expand All @@ -378,7 +378,7 @@ jobs:
- image: ubuntu2504
overrides: ["CMAKE_CXX_STANDARD=23"]
- image: debian125
overrides: ["CMAKE_CXX_STANDARD=20", "dev=ON"]
overrides: ["CMAKE_CXX_STANDARD=20", "dev=ON", "CMAKE_CXX_FLAGS=-Wsuggest-override"]
# Special builds
- image: alma9
is_special: true
Expand Down
2 changes: 1 addition & 1 deletion core/multiproc/inc/TMPWorkerExecutor.h
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ class TMPWorkerExecutor<F, void, void> : public TMPWorker {
public:
explicit TMPWorkerExecutor(F func) : TMPWorker(), fFunc(func) {}
~TMPWorkerExecutor() {}
void HandleInput(MPCodeBufPair &msg)
void HandleInput(MPCodeBufPair &msg) override
{
unsigned code = msg.first;
TSocket *s = GetSocket();
Expand Down
6 changes: 3 additions & 3 deletions roottest/root/io/abstractclass/DataBlock1.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ class DataBlock1 : public DataBlockBase, public PureAbstractInterface {
DataBlock1();
virtual ~DataBlock1();

virtual Short_t GetXyzzy() const;
virtual Short_t GetAbc() const;
Short_t GetXyzzy() const override;
Short_t GetAbc() const override;

private:

ClassDef(DataBlock1,1)
ClassDefOverride(DataBlock1,1)
};

inline Short_t DataBlock1::GetXyzzy() const { return fRawBlock[0]; }
Expand Down
6 changes: 3 additions & 3 deletions roottest/root/io/abstractclass/DataBlock2.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ class DataBlock2 : public DataBlockBase, public PureAbstractInterface {
DataBlock2();
virtual ~DataBlock2();

virtual Short_t GetXyzzy() const;
virtual Short_t GetAbc() const;
Short_t GetXyzzy() const override;
Short_t GetAbc() const override;

private:

ClassDef(DataBlock2,1)
ClassDefOverride(DataBlock2,1)
};

inline Short_t DataBlock2::GetXyzzy() const { return fRawBlock[0]; }
Expand Down
4 changes: 2 additions & 2 deletions roottest/root/io/abstractclass/DataBlockBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class DataBlockBase : public TObject {
inline const Int_t* GetData() const { return fRawBlock; }
inline Int_t GetSize() const { return fSize; }

virtual void Print(Option_t *option="") const;
void Print(Option_t *option="") const override;

protected: // allow derived classes direct access to the data

Expand All @@ -22,7 +22,7 @@ class DataBlockBase : public TObject {

private:

ClassDef(DataBlockBase,1)
ClassDefOverride(DataBlockBase,1)
};

#endif
2 changes: 1 addition & 1 deletion roottest/root/io/arrayobject/foo.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class foobj : public TObject {
Int_t i;
Float_t f;

ClassDef(foobj,1)
ClassDefOverride(foobj,1)
};

class foo {
Expand Down
7 changes: 1 addition & 6 deletions roottest/root/io/clones/RtObj.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,5 @@ class RtObj : public T
public:
RtObj() {}
RtObj( const T & val ) : T(val) {}
ClassDefT(RtObj,1)
ClassDefOverride(RtObj,1)
} ;

ClassDefT2(RtObj,T)

ClassImpT(RtObj,T)

8 changes: 4 additions & 4 deletions roottest/root/io/compression/Event.h
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ class Event : public TObject {
Event();
Event(Int_t i);
virtual ~Event();
void Clear(Option_t *option ="");
void Clear(Option_t *option ="") override;
TDatime &GetDatime() {return fDatime;}
static void Reset(Option_t *option ="");
void ResetHistogramPointer() {fH=0;}
Expand Down Expand Up @@ -179,7 +179,7 @@ class Event : public TObject {

UShortVector* GetUshort() { return &fUshort; }

ClassDef(Event,1) //Event structure
ClassDefOverride(Event,1) //Event structure
};


Expand Down Expand Up @@ -238,7 +238,7 @@ class Track : public TObject {
Short_t GetValid() const { return fValid; }
virtual void SetValid(Int_t valid=1) { fValid = valid; }

ClassDef(Track,1) //A track segment
ClassDefOverride(Track,1) //A track segment
};

class BigTrack : public Track {
Expand All @@ -252,7 +252,7 @@ class BigTrack : public Track {
BigTrack(Float_t random, Int_t special);
virtual ~BigTrack() { }

ClassDef(BigTrack,1) //A Big track
ClassDefOverride(BigTrack,1) //A Big track
};


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ class A:public TObject{

public:
A(){}
ClassDef(A,1)
ClassDefOverride(A,1)

};

Expand All @@ -13,7 +13,7 @@ class B:public TObject{
public:
B(){}
void initializeTransients(){transient_=2;}
ClassDef(B,1)
ClassDefOverride(B,1)
private:
double transient_; //!

Expand Down
12 changes: 6 additions & 6 deletions roottest/root/io/evolution/pragma_read/v1/AliAODForwardMult.h
Original file line number Diff line number Diff line change
Expand Up @@ -277,19 +277,19 @@ class AliAODForwardMult : public TObject
*
* @param option Passed on to TH2::Reset verbatim
*/
void Clear(Option_t* option="");
void Clear(Option_t* option="") override;
/**
* browse this object
*
* @param b Browser
*/
void Browse(TBrowser* b);
void Browse(TBrowser* b) override;
/**
* This is a folder
*
* @return Always true
*/
Bool_t IsFolder() const { return kTRUE; } // Always true
Bool_t IsFolder() const override { return kTRUE; } // Always true

Bool_t IsSecondaryCorrected() const { return TestBit(kSecondary); }
Bool_t IsVertexBiasCorrected() const { return TestBit(kVertexBias); }
Expand All @@ -303,7 +303,7 @@ class AliAODForwardMult : public TObject
*
* @param option Passed verbatim to TH2::Print
*/
void Print(Option_t* option="") const;
void Print(Option_t* option="") const override;
/**
* Set the z coordinate of the interaction point
*
Expand Down Expand Up @@ -401,7 +401,7 @@ class AliAODForwardMult : public TObject
*
* @return Name of object
*/
const Char_t* GetName() const { return (fIsMC ? "ForwardMC" : "Forward"); }
const Char_t* GetName() const override { return (fIsMC ? "ForwardMC" : "Forward"); }
/**
* Check if event meets the passses requirements.
*
Expand Down Expand Up @@ -497,7 +497,7 @@ class AliAODForwardMult : public TObject
UShort_t fNClusters; // Number of SPD clusters in |eta|<1
/** Invalid value for interaction point @f$z@f$ coordiante */
static const Float_t fgkInvalidIpZ; // Invalid IpZ value
ClassDef(AliAODForwardMult,5); // AOD forward multiplicity
ClassDefOverride(AliAODForwardMult,5); // AOD forward multiplicity
};

//____________________________________________________________________
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ class AliAODForwardHeader : public TObject
*
* @param option Not used
*/
void Clear(Option_t* option="");
void Clear(Option_t* option="") override;
/**
* Set the trigger mask
*
Expand Down Expand Up @@ -271,25 +271,25 @@ class AliAODForwardHeader : public TObject
*
* @param option Passed verbatim to TH2::Print
*/
void Print(Option_t* option="") const;
void Print(Option_t* option="") const override;
/**
* Get the name of the object
*
* @return Name of object
*/
const Char_t* GetName() const { return "ForwardHeader"; }
const Char_t* GetName() const override { return "ForwardHeader"; }
/**
* browse this object
*
* @param b Browser
*/
void Browse(TBrowser* b);
void Browse(TBrowser* b) override;
/**
* This is a folder
*
* @return Always true
*/
Bool_t IsFolder() const { return kTRUE; } // Always true
Bool_t IsFolder() const override { return kTRUE; } // Always true
/* @} */
/**
* @{
Expand Down Expand Up @@ -354,7 +354,7 @@ class AliAODForwardHeader : public TObject
UShort_t fNClusters; // Number of SPD clusters in |eta|<1
/** Invalid value for interaction point @f$z@f$ coordiante */
static const Float_t fgkInvalidIpZ; // Invalid IpZ value
ClassDef(AliAODForwardHeader,1); // AOD forward header
ClassDefOverride(AliAODForwardHeader,1); // AOD forward header
};

//____________________________________________________________________
Expand Down
12 changes: 6 additions & 6 deletions roottest/root/io/evolution/pragma_read/v2/AliAODForwardMult.h
Original file line number Diff line number Diff line change
Expand Up @@ -175,19 +175,19 @@ class AliAODForwardMult : public TObject
*
* @param option Passed on to TH2::Reset verbatim
*/
void Clear(Option_t* option="");
void Clear(Option_t* option="") override;
/**
* browse this object
*
* @param b Browser
*/
void Browse(TBrowser* b);
void Browse(TBrowser* b) override;
/**
* This is a folder
*
* @return Always true
*/
Bool_t IsFolder() const { return kTRUE; } // Always true
Bool_t IsFolder() const override { return kTRUE; } // Always true
/**
* @return @c true if secondary corrected
*/
Expand Down Expand Up @@ -237,13 +237,13 @@ class AliAODForwardMult : public TObject
*
* @param option Passed verbatim to TH2::Print
*/
void Print(Option_t* option="") const;
void Print(Option_t* option="") const override;
/**
* Get the name of the object
*
* @return Name of object
*/
const Char_t* GetName() const { return (fIsMC ? "ForwardMC" : "Forward"); }
const Char_t* GetName() const override { return (fIsMC ? "ForwardMC" : "Forward"); }
/**
* Create a backward compatiblity header
*
Expand All @@ -263,7 +263,7 @@ class AliAODForwardMult : public TObject
TH2D fHist; // Histogram of d^2N_{ch}/(deta dphi) for this event
AliAODForwardHeader* fHeader; //! Cached header

ClassDef(AliAODForwardMult,6); // AOD forward multiplicity
ClassDefOverride(AliAODForwardMult,6); // AOD forward multiplicity
};

#endif
Expand Down
2 changes: 1 addition & 1 deletion roottest/root/io/json/test_classes.h
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ class TJsonEx4 : public TJsonEx1 {
strcpy((char*)fStr4, "--- normal string value ---");
}

void Print()
void Print() override
{
TJsonEx1::Print();
std::cout << " fStr1 = " << fStr1 << std::endl;
Expand Down
2 changes: 1 addition & 1 deletion roottest/root/io/rootcint/foo.hh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class foo
{
public:
void a();
ClassDef (foo, 1);
ClassDefOverride (foo, 1);
};

}
Expand Down
4 changes: 2 additions & 2 deletions roottest/root/io/treeproblem/Foo.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ class Foo : public TObject

void SetFoo(Int_t foo=0) { fFoo = foo; }
Int_t GetFoo() const { return fFoo; }
void Print(Option_t * = "") const;
void Print(Option_t * = "") const override;

ClassDef(Foo,1) // DOCUMENT ME
ClassDefOverride(Foo,1) // DOCUMENT ME
};

#endif
Expand Down
2 changes: 1 addition & 1 deletion roottest/root/io/xml/test_classes.h
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ class TXmlEx4 : public TXmlEx1 {
delete[] fStr3;
}

void Print()
void Print() override
{
TXmlEx1::Print();
std::cout << " fStr1 = " << fStr1 << std::endl;
Expand Down
2 changes: 1 addition & 1 deletion roottest/root/meta/iotypeioname/classes.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class Container: public TObject {
SuperCluster m_sc;
Particle m_part;

ClassDef(Container,1);
ClassDefOverride(Container,1);
};

#endif
2 changes: 1 addition & 1 deletion roottest/root/ntuple/streamerfield/Event_v2.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ struct StreamerDerived : public StreamerBase {
int fSecond = 2;
virtual ~StreamerDerived() = default;

ClassDef(StreamerDerived, 2)
ClassDefOverride(StreamerDerived, 2)
};

struct StreamerContainer {
Expand Down
2 changes: 1 addition & 1 deletion roottest/root/ntuple/streamerfield/Event_v3.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ struct StreamerDerived : public StreamerBase {
int fFirst = 1;
virtual ~StreamerDerived() = default;

ClassDef(StreamerDerived, 3)
ClassDefOverride(StreamerDerived, 3)
};

struct StreamerContainer {
Expand Down
Loading