Skip to content
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

Adding clang format. #436

Open
wants to merge 34 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
84a248c
Adding clang format.
DanielWielanek Nov 10, 2022
0e05fca
Update .clang-format
DanielWielanek Nov 11, 2022
a5c9a67
Update .clang-format
DanielWielanek Nov 11, 2022
2e4f2aa
Merge remote-tracking branch 'star-bnl/main' into DanielWielanek/main
plexoos Nov 11, 2022
baab1a2
Don't trigger CI for changes in .clang-format
plexoos Nov 11, 2022
4be9085
Test of workflow added.
DanielWielanek Nov 17, 2022
b6c965f
Experimental change of formatter.
DanielWielanek Nov 17, 2022
54d1f82
Removed old commment.
DanielWielanek Nov 17, 2022
d69697a
rm .github/workflows/build-pull-request.yml
plexoos Nov 17, 2022
741c1cb
Update StHbtMaker.h
DanielWielanek Nov 17, 2022
2126d58
Update check-format.yml
DanielWielanek Nov 17, 2022
a84eec5
Update check-format.yml
DanielWielanek Nov 22, 2022
eee5b1a
Update check-format.yml
DanielWielanek Nov 24, 2022
a9f966b
Update check-format.yml
DanielWielanek Nov 24, 2022
9ab8f0e
Update check-format.yml
DanielWielanek Nov 24, 2022
85ebfbe
Update check-format.yml
DanielWielanek Nov 24, 2022
111fdad
Update check-format.yml
DanielWielanek Nov 24, 2022
580992e
Update check-format.yml
DanielWielanek Nov 24, 2022
5be6f4c
Update check-format.yml
DanielWielanek Nov 24, 2022
c14645d
Update check-format.yml
DanielWielanek Nov 24, 2022
cbdd239
Update check-format.yml
DanielWielanek Nov 24, 2022
66e0987
Update check-format.yml
DanielWielanek Nov 24, 2022
9bcbfa9
Update check-format.yml
DanielWielanek Nov 24, 2022
ff87fa1
Update check-format.yml
DanielWielanek Nov 24, 2022
ac70c1c
Update check-format.yml
DanielWielanek Nov 30, 2022
27f7e6a
Clang format test.
DanielWielanek Nov 30, 2022
9f555f9
Removed some test.
DanielWielanek Nov 30, 2022
649cf02
Update check-format.yml
DanielWielanek Nov 30, 2022
f46bb3d
Update check-format.yml
DanielWielanek Nov 30, 2022
b863d09
Update check-format.yml
DanielWielanek Nov 30, 2022
08276b6
Restore pull request file
DanielWielanek Dec 1, 2022
5b3dc17
Merge branch 'star-bnl:main' into main
DanielWielanek Dec 14, 2022
6f6e4d2
Merge branch 'star-bnl:main' into main
DanielWielanek Apr 29, 2023
b663d44
Merge branch 'star-bnl:main' into main
DanielWielanek May 8, 2023
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
11 changes: 11 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
BasedOnStyle: Google
ColumnLimit: '120'
IndentPPDirectives: None
IndentWidth: '3'
MaxEmptyLinesToKeep: '1'
SpacesInParentheses: 'false'
TabWidth: '3'
UseTab: Never

...
19 changes: 19 additions & 0 deletions .github/workflows/check-format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: clang-format Check
on: [push, pull_request]
jobs:
formatting-check:
name: Formatting Check
runs-on: ubuntu-latest
steps:
#this is needed to get sha of central repo
- name: test_Files
uses: actions/checkout@v3
with:
fetch-depth: 0 # OR "2" -> To retrieve the preceding commit.
- name: Run clang-format style check for C/C++ files.
uses: DanielWielanek/clang-format-action@main
with:
clang-format-version: '13'
check-path: '.'
upstream-branch: upstream/main
upstream-path: https://github.com/star-bnl/star-sw.git
58 changes: 29 additions & 29 deletions StRoot/StHbtMaker/StHbtMaker.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,48 +61,48 @@ typedef int Int_t;
#endif

#include "StHbtMaker/Infrastructure/StHbtManager.h"
//class StHbtManager;

// class StHbtManager;

class StHbtMaker
#ifdef __ROOT__
: public StMaker
#ifdef __ROOT__
: public StMaker
#endif
{

private:
StHbtManager* mHbtManager;//! tells cint to skip it

int mDebug;
public:
StHbtMaker(const char* name = "StHbt", const char* title = "StHbtTit");
virtual ~StHbtMaker();
virtual void Clear(const char* opt="");
virtual Int_t Init();//!
virtual Int_t Make();
virtual Int_t Finish();//!
private:
StHbtManager* mHbtManager; //! tells cint to skip it

int mDebug;

int Debug() const;
void SetDebug(int);
public:
StHbtMaker(const char* name = "StHbt", const char* title = "StHbtTit");
virtual ~StHbtMaker();
virtual void Clear(const char* opt = "");
virtual Int_t Init(); //!
virtual Int_t Make();
virtual Int_t Finish(); //!

int Debug() const;
void SetDebug(int);

#ifdef __ROOT__
StMaker* currentChain;
StMaker* currentChain;
#endif
// StHbtManager* HbtManager();//! tells cint to skip that
StHbtManager* HbtManager();
// StHbtManager* HbtManager();//! tells cint to skip that
StHbtManager* HbtManager();


virtual const char *GetCVS() const
{static const char cvs[]="Tag $Name: $ $Id: StHbtMaker.h,v 1.9 2014/08/06 11:43:19 jeromel Exp $ built " __DATE__ " " __TIME__ ; return cvs;}
virtual const char* GetCVS() const {
static const char cvs[] =
"Tag $Name: $ $Id: StHbtMaker.h,v 1.9 2014/08/06 11:43:19 jeromel Exp $ built " __DATE__ " " __TIME__;
return cvs;
}
#ifdef __ROOT__
ClassDef(StHbtMaker,0)
ClassDef(StHbtMaker, 0)
#endif
};

inline StHbtManager* StHbtMaker::HbtManager(){return mHbtManager;}
inline int StHbtMaker::Debug() const {return mDebug;}
inline void StHbtMaker::SetDebug(int d){mDebug=d;}

//this is test comment for testing cvs commit
inline StHbtManager* StHbtMaker::HbtManager() { return mHbtManager; }
inline int StHbtMaker::Debug() const { return mDebug; }
inline void StHbtMaker::SetDebug(int d) { mDebug = d; }

#endif