Skip to content
Snippets Groups Projects
Commit e3b7f5ec authored by Boman Romain's avatar Boman Romain
Browse files

use clang-format-14 as in docker image (ubuntu 22.04)

parent 88c2a947
No related branches found
Tags v1.0.6
1 merge request!7Update docker image to ubuntu 22.04
Pipeline #11008 passed
......@@ -19,7 +19,7 @@ format:
<<: *global_tag_def
stage: build
script:
- clang-format --version # the use should use this version too!
- clang-format --version # the user should use this version too!
- ./scripts/format_code.py
- mkdir -p patches
- if git diff --patch --exit-code > patches/clang-format.patch; then echo "Clang format changed nothing"; else echo "Clang format found changes to make!"; false; fi
......
......@@ -49,7 +49,7 @@ protected:
virtual std::streamsize xsputn(const char *s, std::streamsize n);
virtual int_type overflow(int c);
};
#endif //SWIG
#endif // SWIG
/**
* @brief redirect std::cout/std::cerr to python sys.stdout/sys.stderr
......@@ -66,4 +66,4 @@ public:
static void test();
};
#endif //CPPBUF2PY_H
#endif // CPPBUF2PY_H
......@@ -34,7 +34,7 @@ FWK_API void testswig(bool i) // testswig(3.0) displays 1 (no error and cast flo
/**
* @brief Enable Floating Point Exception
*
*
* Imported from Metafor
* @authors Adrien Crovato
*/
......@@ -55,7 +55,7 @@ FWK_API void enableFpe()
#else // defined(WIN32)
std::cout << ANSI_COLOR_YELLOW << "Floating-Point Exceptions not implemented for this compiler!" << ANSI_COLOR_RESET << std::endl;
#endif
#endif //!defined(__MINGW32__)
#endif //! defined(__MINGW32__)
}
/**
......
......@@ -64,4 +64,4 @@ FWK_API void testswig(bool i);
FWK_API void enableFpe();
FWK_API void disableFpe();
#endif //FWK_H
#endif // FWK_H
......@@ -41,4 +41,4 @@ public:
} // namespace fwk
#endif //WEXTRACT_H
#endif // WEXTRACT_H
......@@ -43,4 +43,4 @@ public:
};
} // namespace fwk
#endif //WHMSTIME_H
#endif // WHMSTIME_H
......@@ -71,4 +71,4 @@ public:
} // namespace fwk
#endif //WOBJECT_H
#endif // WOBJECT_H
......@@ -36,4 +36,4 @@ public:
} // namespace fwk
#endif //WOBSERVER_H
#endif // WOBSERVER_H
......@@ -59,7 +59,7 @@ public:
Int64Time operator-(Int64Time const &obj) const { return Int64Time(time - obj.time); }
};
#else //WIN32
#else // WIN32
class FWK_API UnixClockTime : public Time
{
......@@ -73,7 +73,7 @@ public:
UnixClockTime operator-(UnixClockTime const &obj) const { return UnixClockTime(time - obj.time); }
};
#endif //WIN32
#endif // WIN32
//-----------------------------------------------------------------------------------------
......@@ -109,7 +109,7 @@ public:
DblTime operator-(DblTime const &obj) const { return DblTime(time - obj.time); }
};
#endif //SWIG
#endif // SWIG
}; // namespace fwk
#endif //WTIME_H
#endif // WTIME_H
......@@ -53,4 +53,4 @@ public:
#endif
};
}; // namespace fwk
#endif //TIMER_H
#endif // TIMER_H
......@@ -44,4 +44,4 @@ public:
#endif
};
}; // namespace fwk
#endif //TIMERS_H
#endif // TIMERS_H
......@@ -72,4 +72,4 @@ public:
#include "wTimes.inl"
}; // namespace fwk
#endif //WTIMES_H
#endif // WTIMES_H
......@@ -43,7 +43,7 @@ def main():
encs = {}
for f in all_files(os.getcwd(), patterns='*.cpp;*.c;*.h;*.hpp'):
# print(f)
cmd = ['clang-format', "-style=file", "-i", f]
cmd = ['clang-format-14', "-style=file", "-i", f]
retcode = subprocess.call(cmd)
if retcode != 0:
print(f'ERROR: retcode = {retcode}')
......
......@@ -28,4 +28,4 @@ TBOX_API void
tomatlab(std::string const &fname, Eigen::SparseMatrix<double> const &A);
}
#endif //EIGEN_EXTRA_H
#endif // EIGEN_EXTRA_H
......@@ -40,4 +40,4 @@ ostream &operator<<(ostream &out, vector<T> const &v)
} // namespace std
#endif //STD_EXTRA_H
#endif // STD_EXTRA_H
......@@ -109,4 +109,4 @@ class UnitTest;
} // namespace tbox
#endif //TBOX_H
#endif // TBOX_H
......@@ -49,4 +49,4 @@ public:
} // namespace tbox
#endif //WCACHE_H
#endif // WCACHE_H
......@@ -43,4 +43,4 @@ public:
} // namespace tbox
#endif //WCACHEHEX8_H
#endif // WCACHEHEX8_H
......@@ -43,4 +43,4 @@ public:
} // namespace tbox
#endif //WCACHELINE2_H
#endif // WCACHELINE2_H
......@@ -38,4 +38,4 @@ public:
} // namespace tbox
#endif //WCACHEPOINT1_H
#endif // WCACHEPOINT1_H
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment