From ff40323d5584f2e5c70f9853f36dde288f7ad567 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Le=20Bihan?= Date: Sun, 23 May 2021 01:11:27 +0200 Subject: [PATCH 01/50] adding issues templates (auto project & labels) --- .github/ISSUE_TEMPLATE/config.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/config.yml diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 00000000..b18963f4 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,11 @@ +blank_issues_enabled: true +contact_links: + - name: Game issue + about: Create an Game related issue + url: https://github.com/AnonymusRaccoon/Bomberman/issues/new?projects=AnonymusRaccoon/Bomberman/2&labels=Game + - name: ECS issue + about: Create an ECS related issue + url: https://github.com/AnonymusRaccoon/Bomberman/issues/new?projects=AnonymusRaccoon/Bomberman/1&labels=ECS + - name: Renderer issue + about: Create an Renderer/Encapsulation related issue + url: https://github.com/AnonymusRaccoon/Bomberman/issues/new?projects=AnonymusRaccoon/Bomberman/3&labels=Renderer \ No newline at end of file From b372ac1780e8ad6e0d0fe52961537c039f4133f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Le=20Bihan?= Date: Sun, 23 May 2021 01:24:46 +0200 Subject: [PATCH 02/50] adding pr templates --- .github/pull_request_template.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .github/pull_request_template.md diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 00000000..1f5856c6 --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,20 @@ +## Proposed changes + +Describe here the big picture of your changes here to communicate to the others members of the group and why we should accept this pull request. + +### If it fixes a bug or resolves a feature request, be sure to link to that issue. + +## Information +- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) +- [ ] Non-breaking changes + +## Checklist + +- [ ] I have added tests that prove my fix is effective or that my feature works +- [ ] I have added necessary documentation + +## Further comments + +### If not needed, remove this section +If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did +and what alternatives you considered, etc... From 561fc635e59cb324737a20a49f50f5322dc1c742 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Le=20Bihan?= Date: Sun, 23 May 2021 01:31:43 +0200 Subject: [PATCH 03/50] pr template v2 --- .github/pull_request_template.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 1f5856c6..f4cd2451 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1,5 +1,9 @@ ## Proposed changes +### Make sure that the pull request is going to `develop` branch + +#### Add all necessary labels to understand with ease the scope of this pull request + Describe here the big picture of your changes here to communicate to the others members of the group and why we should accept this pull request. ### If it fixes a bug or resolves a feature request, be sure to link to that issue. From 195c5af511ca744c0faa96b739d6aad7a57d3168 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Le=20Bihan?= Date: Sun, 23 May 2021 01:33:11 +0200 Subject: [PATCH 04/50] title fix --- .github/pull_request_template.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index f4cd2451..2753adaa 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -2,7 +2,7 @@ ### Make sure that the pull request is going to `develop` branch -#### Add all necessary labels to understand with ease the scope of this pull request +### Add all necessary labels to understand with ease the scope of this pull request Describe here the big picture of your changes here to communicate to the others members of the group and why we should accept this pull request. From 1d4f48a3f1527ec2e5cdf1766628b61da4ade261 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Le=20Bihan?= Date: Sun, 23 May 2021 16:46:25 +0200 Subject: [PATCH 05/50] adding CPPLINT.cfg --- CPPLINT.cfg | 21 ++++++++ lib/Ray/sources/Drawables/Image.hpp | 70 +++++++++++++++++++++++++ lib/wal/sources/Component/Component.cpp | 4 +- lib/wal/sources/Component/Component.hpp | 2 +- sources/main.cpp | 12 +++++ 5 files changed, 106 insertions(+), 3 deletions(-) create mode 100644 CPPLINT.cfg create mode 100644 lib/Ray/sources/Drawables/Image.hpp diff --git a/CPPLINT.cfg b/CPPLINT.cfg new file mode 100644 index 00000000..477f50fa --- /dev/null +++ b/CPPLINT.cfg @@ -0,0 +1,21 @@ + +# Don't search for additional CPPLINT.cfg in parent directories. +set noparent +# Use 'ART_' as the cpp header guard prefix (e.g. #ifndef ART_PATH_TO_FILE_H_). +root=. +# Limit line length. +linelength=120 +# Ignore the following categories of errors, as specified by the filter: +# (the filter settings are concatenated together) +filter=-build/c++11 +filter=-whitespace/tab +filter=-whitespace/braces +filter=-legal/copyright +filter=-runtime/indentation_namespace +filter=-whitespace/ending_newline +#filter=-readability/function,-readability/streams,-readability/todo +#filter=-runtime/printf,-runtime/references,-runtime/sizeof,-runtime/threadsafe_fn +# TODO: this should be re-enabled. + +exclude_files=cmake-build-debug/* +exclude_files=build/* \ No newline at end of file diff --git a/lib/Ray/sources/Drawables/Image.hpp b/lib/Ray/sources/Drawables/Image.hpp new file mode 100644 index 00000000..3dfca7cc --- /dev/null +++ b/lib/Ray/sources/Drawables/Image.hpp @@ -0,0 +1,70 @@ +/* +** EPITECH PROJECT, 2021 +** Bomberman +** File description: +** Image +*/ + +#ifndef IMAGE_HPP_ +#define IMAGE_HPP_ + +#include +#include +#include "Canvas.hpp" +#include "Texture.hpp" +#include "IRessource.hpp" + +namespace RAY +{ + namespace Drawables { + class ADrawable2D; + } + class IRessource; + //! @brief Object representation of a framebuffer + class Image: public Canvas, public IRessource { + public: + //! @brief Create an image, loading a file + //! @param filename: path to file to load + explicit Image(const std::string &filename); + + //! @brief Create an image, using data from a texure + //! @param texture: texture to extract data from + explicit Image(Texture &texture); + + //! @brief A default copy constructor + Image(const Image &image) = default; + + //! @brief A default constructor, no ressources loaded + Image(); + + //! @brief An image is assignable + Image &operator=(const Image &image) = default; + + //! @brief Image destructor, will unload ressources + ~Image() override; + + //! @brief load ressources from file + //! @param filename: path of input + bool load(const std::string &filename) override; + + //! @brief export to file + //! @param outputPath: path of output + bool exportTo(const std::string &outputPath); + + //! @brief unload ressources + bool unload() override; + + //! @brief get image + operator ::Image() const; + operator ::Image *(); + + //! @brief draw drawable + void draw(Drawables::ADrawable2D &); + + private: + //! @brief Image, really, that's just it... + ::Image _image; + }; +} + +#endif /* !IMAGE_HPP_ */ diff --git a/lib/wal/sources/Component/Component.cpp b/lib/wal/sources/Component/Component.cpp index fb4e1279..1c0144da 100644 --- a/lib/wal/sources/Component/Component.cpp +++ b/lib/wal/sources/Component/Component.cpp @@ -22,11 +22,11 @@ namespace WAL void Component::onStart() { - //TODO handle events here + // TODO handle events here } void Component::onStop() { - //TODO handle events here + // TODO handle events here } } \ No newline at end of file diff --git a/lib/wal/sources/Component/Component.hpp b/lib/wal/sources/Component/Component.hpp index b2441383..dd8d02d9 100644 --- a/lib/wal/sources/Component/Component.hpp +++ b/lib/wal/sources/Component/Component.hpp @@ -12,7 +12,7 @@ namespace WAL { //! @brief The entity class, used to prevent circular dependencies. class Entity; - + //! @brief Represent a single component of WAL. class Component { diff --git a/sources/main.cpp b/sources/main.cpp index 3096203d..9c9f5229 100644 --- a/sources/main.cpp +++ b/sources/main.cpp @@ -7,7 +7,19 @@ #include +<<<<<<< Updated upstream #include +======= +#include +#include "Window.hpp" +#include "Drawables/2D/Text.hpp" +#include "Drawables/2D/Circle.hpp" +#include "Controllers/Keyboard.hpp" +#include "Camera/Camera3D.hpp" +#include "Drawables/3D/Grid.hpp" +#include "Drawables/3D/Cube.hpp" +#include "Wal.hpp" +>>>>>>> Stashed changes int main() { From d1c3dc6e2572b856daa3f9c2f0e1261f5b7a2240 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Le=20Bihan?= Date: Sun, 23 May 2021 16:49:01 +0200 Subject: [PATCH 06/50] fixing compil --- sources/main.cpp | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/sources/main.cpp b/sources/main.cpp index 9c9f5229..bc091ba2 100644 --- a/sources/main.cpp +++ b/sources/main.cpp @@ -7,19 +7,8 @@ #include -<<<<<<< Updated upstream -#include -======= #include -#include "Window.hpp" -#include "Drawables/2D/Text.hpp" -#include "Drawables/2D/Circle.hpp" -#include "Controllers/Keyboard.hpp" -#include "Camera/Camera3D.hpp" -#include "Drawables/3D/Grid.hpp" -#include "Drawables/3D/Cube.hpp" #include "Wal.hpp" ->>>>>>> Stashed changes int main() { From 4f4785a112b540e2d4868a1ae746229edf91f52d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Le=20Bihan?= Date: Sun, 23 May 2021 16:52:48 +0200 Subject: [PATCH 07/50] rm header guard code style (not supporting pragma) --- CPPLINT.cfg | 1 + 1 file changed, 1 insertion(+) diff --git a/CPPLINT.cfg b/CPPLINT.cfg index 477f50fa..53e7904e 100644 --- a/CPPLINT.cfg +++ b/CPPLINT.cfg @@ -13,6 +13,7 @@ filter=-whitespace/braces filter=-legal/copyright filter=-runtime/indentation_namespace filter=-whitespace/ending_newline +filter=-build/header_guard #filter=-readability/function,-readability/streams,-readability/todo #filter=-runtime/printf,-runtime/references,-runtime/sizeof,-runtime/threadsafe_fn # TODO: this should be re-enabled. From b0a77b1a560ef0030971c496daa7be814b9373da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Le=20Bihan?= Date: Sun, 23 May 2021 17:17:05 +0200 Subject: [PATCH 08/50] norm fix --- CPPLINT.cfg | 2 ++ lib/Ray/sources/Drawables/Image.hpp | 4 ++-- lib/wal/sources/Component/Component.cpp | 2 +- lib/wal/sources/Component/Component.hpp | 4 ++-- lib/wal/sources/Component/Movable/MovableComponent.cpp | 2 +- lib/wal/sources/Component/Movable/MovableComponent.hpp | 2 +- lib/wal/sources/Component/Position/PositionComponent.cpp | 2 +- lib/wal/sources/Component/Position/PositionComponent.hpp | 2 +- lib/wal/sources/Entity/Entity.cpp | 4 ++-- lib/wal/sources/Entity/Entity.hpp | 4 ++-- lib/wal/sources/Exception/WalError.cpp | 2 +- lib/wal/sources/Exception/WalError.hpp | 2 +- lib/wal/sources/Models/Callback.hpp | 2 +- lib/wal/sources/Models/Vector3.hpp | 8 ++++---- lib/wal/sources/Scene/Scene.cpp | 3 +-- lib/wal/sources/Scene/Scene.hpp | 2 +- lib/wal/sources/System/Movable/MovableSystem.cpp | 2 +- lib/wal/sources/System/Movable/MovableSystem.hpp | 2 +- lib/wal/sources/System/System.cpp | 2 +- lib/wal/sources/System/System.hpp | 2 +- lib/wal/sources/Wal.cpp | 2 +- lib/wal/sources/Wal.hpp | 3 ++- sources/main.cpp | 2 +- 23 files changed, 32 insertions(+), 30 deletions(-) diff --git a/CPPLINT.cfg b/CPPLINT.cfg index 53e7904e..81525644 100644 --- a/CPPLINT.cfg +++ b/CPPLINT.cfg @@ -14,6 +14,8 @@ filter=-legal/copyright filter=-runtime/indentation_namespace filter=-whitespace/ending_newline filter=-build/header_guard +filter=-readability/todo +filer=-whitespace/indent # due to public class rule #filter=-readability/function,-readability/streams,-readability/todo #filter=-runtime/printf,-runtime/references,-runtime/sizeof,-runtime/threadsafe_fn # TODO: this should be re-enabled. diff --git a/lib/Ray/sources/Drawables/Image.hpp b/lib/Ray/sources/Drawables/Image.hpp index 3dfca7cc..dae6385f 100644 --- a/lib/Ray/sources/Drawables/Image.hpp +++ b/lib/Ray/sources/Drawables/Image.hpp @@ -64,7 +64,7 @@ namespace RAY private: //! @brief Image, really, that's just it... ::Image _image; - }; -} + }; +} // namespace RAY #endif /* !IMAGE_HPP_ */ diff --git a/lib/wal/sources/Component/Component.cpp b/lib/wal/sources/Component/Component.cpp index 1c0144da..aba34221 100644 --- a/lib/wal/sources/Component/Component.cpp +++ b/lib/wal/sources/Component/Component.cpp @@ -29,4 +29,4 @@ namespace WAL { // TODO handle events here } -} \ No newline at end of file +} // namespace WAL \ No newline at end of file diff --git a/lib/wal/sources/Component/Component.hpp b/lib/wal/sources/Component/Component.hpp index dd8d02d9..33794d89 100644 --- a/lib/wal/sources/Component/Component.hpp +++ b/lib/wal/sources/Component/Component.hpp @@ -37,7 +37,7 @@ namespace WAL //! @param entity The entity that owns the ne component. virtual Component *clone(Entity &entity) const = 0; - //! @brief Used if the component is disabled + //! @brief Used if the component is disabled bool isDisabled() const; //! @brief Disable this component. void setDisable(bool disabled); @@ -48,4 +48,4 @@ namespace WAL //! @brief The entity or this component has just been disable. virtual void onStop(); }; -} \ No newline at end of file +} // namespace WAL \ No newline at end of file diff --git a/lib/wal/sources/Component/Movable/MovableComponent.cpp b/lib/wal/sources/Component/Movable/MovableComponent.cpp index a86a69ab..2f639a7b 100644 --- a/lib/wal/sources/Component/Movable/MovableComponent.cpp +++ b/lib/wal/sources/Component/Movable/MovableComponent.cpp @@ -19,4 +19,4 @@ namespace WAL { this->_acceleration += force; } -} \ No newline at end of file +} // namespace WAL \ No newline at end of file diff --git a/lib/wal/sources/Component/Movable/MovableComponent.hpp b/lib/wal/sources/Component/Movable/MovableComponent.hpp index 0693121a..c96f767f 100644 --- a/lib/wal/sources/Component/Movable/MovableComponent.hpp +++ b/lib/wal/sources/Component/Movable/MovableComponent.hpp @@ -36,4 +36,4 @@ namespace WAL friend class MovableSystem; }; -} \ No newline at end of file +} // namespace WAL \ No newline at end of file diff --git a/lib/wal/sources/Component/Position/PositionComponent.cpp b/lib/wal/sources/Component/Position/PositionComponent.cpp index 1e470254..523ff3d1 100644 --- a/lib/wal/sources/Component/Position/PositionComponent.cpp +++ b/lib/wal/sources/Component/Position/PositionComponent.cpp @@ -40,4 +40,4 @@ namespace WAL { return this->position.z; } -} \ No newline at end of file +} // namespace WAL \ No newline at end of file diff --git a/lib/wal/sources/Component/Position/PositionComponent.hpp b/lib/wal/sources/Component/Position/PositionComponent.hpp index 8e11a2e3..f6a84e27 100644 --- a/lib/wal/sources/Component/Position/PositionComponent.hpp +++ b/lib/wal/sources/Component/Position/PositionComponent.hpp @@ -39,4 +39,4 @@ namespace WAL //! @brief A position component is not assignable PositionComponent &operator=(const PositionComponent &) = delete; }; -} +} // namespace WAL \ No newline at end of file diff --git a/lib/wal/sources/Entity/Entity.cpp b/lib/wal/sources/Entity/Entity.cpp index 9a59447b..56627a16 100644 --- a/lib/wal/sources/Entity/Entity.cpp +++ b/lib/wal/sources/Entity/Entity.cpp @@ -3,7 +3,7 @@ // #include "Entity/Entity.hpp" - +#include #include namespace WAL @@ -67,4 +67,4 @@ namespace WAL }); return existing != this->_components.end(); } -} \ No newline at end of file +} // namespace WAL \ No newline at end of file diff --git a/lib/wal/sources/Entity/Entity.hpp b/lib/wal/sources/Entity/Entity.hpp index 5f4b21ca..f0c3d641 100644 --- a/lib/wal/sources/Entity/Entity.hpp +++ b/lib/wal/sources/Entity/Entity.hpp @@ -34,7 +34,7 @@ namespace WAL //! @brief Get the name fo the entity std::string getName() const; - //! @brief Used if the entity is disabled + //! @brief Used if the entity is disabled bool isDisable() const; //! @brief Disable this entity. @@ -114,4 +114,4 @@ namespace WAL //! @brief An entity is assignable Entity &operator=(const Entity &) = default; }; -} \ No newline at end of file +} // namespace WAL \ No newline at end of file diff --git a/lib/wal/sources/Exception/WalError.cpp b/lib/wal/sources/Exception/WalError.cpp index 53581300..7a3d3b24 100644 --- a/lib/wal/sources/Exception/WalError.cpp +++ b/lib/wal/sources/Exception/WalError.cpp @@ -17,4 +17,4 @@ namespace WAL NotFoundError::NotFoundError(const std::string &what) : WalError(what) {} -} \ No newline at end of file +} // namespace WAL \ No newline at end of file diff --git a/lib/wal/sources/Exception/WalError.hpp b/lib/wal/sources/Exception/WalError.hpp index 0c791647..417ebbd7 100644 --- a/lib/wal/sources/Exception/WalError.hpp +++ b/lib/wal/sources/Exception/WalError.hpp @@ -51,4 +51,4 @@ namespace WAL //! @brief A default assignment operator NotFoundError &operator=(const NotFoundError &) = default; }; -} +} // namespace WAL \ No newline at end of file diff --git a/lib/wal/sources/Models/Callback.hpp b/lib/wal/sources/Models/Callback.hpp index 9cce38cd..4b5ed23a 100644 --- a/lib/wal/sources/Models/Callback.hpp +++ b/lib/wal/sources/Models/Callback.hpp @@ -51,4 +51,4 @@ namespace WAL //! @brief A default assignment operator Callback &operator=(const Callback &) = default; }; -} \ No newline at end of file +} // namespace WAL \ No newline at end of file diff --git a/lib/wal/sources/Models/Vector3.hpp b/lib/wal/sources/Models/Vector3.hpp index 9aa58d10..8ae6f2fe 100644 --- a/lib/wal/sources/Models/Vector3.hpp +++ b/lib/wal/sources/Models/Vector3.hpp @@ -85,13 +85,13 @@ namespace WAL } template - Vector3 operator*(Vector3 &b) const + Vector3 operator*(const Vector3 &b) const { return Vector3(this->x * b.x, this->y * b.y, this->z * b.z); } template - Vector3 operator/=(Vector3 &b) + Vector3 operator/=(const Vector3 &b) { this->x /= b.x; this->y /= b.y; @@ -100,7 +100,7 @@ namespace WAL } template - Vector3 operator/(Vector3 &b) const + Vector3 operator/(const Vector3 &b) const { return Vector3(this->x / b.x, this->y / b.y, this->z / b.z); } @@ -164,4 +164,4 @@ std::ostream &operator<<(std::ostream &s, const WAL::Vector3 &v) { s << "Vector3<" << typeid(T).name() << ">("<< v.x << ", " << v.y << ", " << v.z << ")"; return s; -} \ No newline at end of file +} // namespace WAL \ No newline at end of file diff --git a/lib/wal/sources/Scene/Scene.cpp b/lib/wal/sources/Scene/Scene.cpp index b0a3b3a7..0ec83228 100644 --- a/lib/wal/sources/Scene/Scene.cpp +++ b/lib/wal/sources/Scene/Scene.cpp @@ -10,5 +10,4 @@ namespace WAL { return this->_entities; } -} - +} // namespace WAL \ No newline at end of file diff --git a/lib/wal/sources/Scene/Scene.hpp b/lib/wal/sources/Scene/Scene.hpp index 00329172..3491170e 100644 --- a/lib/wal/sources/Scene/Scene.hpp +++ b/lib/wal/sources/Scene/Scene.hpp @@ -39,4 +39,4 @@ namespace WAL //! @brief A scene is assignable Scene &operator=(const Scene &) = default; }; -} +} // namespace WAL \ No newline at end of file diff --git a/lib/wal/sources/System/Movable/MovableSystem.cpp b/lib/wal/sources/System/Movable/MovableSystem.cpp index 7bd56fb0..db47d6b2 100644 --- a/lib/wal/sources/System/Movable/MovableSystem.cpp +++ b/lib/wal/sources/System/Movable/MovableSystem.cpp @@ -25,4 +25,4 @@ namespace WAL movable._velocity = movable._acceleration * Wal::timestep.count(); movable._acceleration = Vector3f(); } -} \ No newline at end of file +} // namespace WAL \ No newline at end of file diff --git a/lib/wal/sources/System/Movable/MovableSystem.hpp b/lib/wal/sources/System/Movable/MovableSystem.hpp index f7ec3c3c..d19258ae 100644 --- a/lib/wal/sources/System/Movable/MovableSystem.hpp +++ b/lib/wal/sources/System/Movable/MovableSystem.hpp @@ -25,4 +25,4 @@ namespace WAL //! @brief A movable system is assignable. MovableSystem &operator=(const MovableSystem &) = default; }; -} +} // namespace WAL diff --git a/lib/wal/sources/System/System.cpp b/lib/wal/sources/System/System.cpp index 56814735..4cf91ac6 100644 --- a/lib/wal/sources/System/System.cpp +++ b/lib/wal/sources/System/System.cpp @@ -25,4 +25,4 @@ namespace WAL { return this->_dependencies; } -} \ No newline at end of file +} // namespace WAL \ No newline at end of file diff --git a/lib/wal/sources/System/System.hpp b/lib/wal/sources/System/System.hpp index 5ab9b8a5..98905ee9 100644 --- a/lib/wal/sources/System/System.hpp +++ b/lib/wal/sources/System/System.hpp @@ -44,4 +44,4 @@ namespace WAL //! @brief A system can't be instantiated, it should be derived. System &operator=(const System &) = default; }; -} \ No newline at end of file +} // namespace WAL \ No newline at end of file diff --git a/lib/wal/sources/Wal.cpp b/lib/wal/sources/Wal.cpp index 45d2caff..abda5061 100644 --- a/lib/wal/sources/Wal.cpp +++ b/lib/wal/sources/Wal.cpp @@ -66,4 +66,4 @@ namespace WAL return entity.hasComponent(dependency); }); } -} \ No newline at end of file +} // namespace WAL \ No newline at end of file diff --git a/lib/wal/sources/Wal.hpp b/lib/wal/sources/Wal.hpp index f1b61f6f..d4be58c5 100644 --- a/lib/wal/sources/Wal.hpp +++ b/lib/wal/sources/Wal.hpp @@ -6,6 +6,7 @@ #pragma once #include +#include #include #include #include @@ -112,4 +113,4 @@ namespace WAL //! @brief A WAL can't be assigned. Wal &operator=(const Wal &) = delete; }; -} +} // namespace WAL \ No newline at end of file diff --git a/sources/main.cpp b/sources/main.cpp index bc091ba2..29af56f6 100644 --- a/sources/main.cpp +++ b/sources/main.cpp @@ -18,7 +18,7 @@ int main() wal.run(); return 0; } catch (const std::exception &ex) { - std::cerr << ex.what() << std::endl; +std::cerr << ex.what() << std::endl; return 84; } } From 2a12e06f50de0669e4d58e0d2e5d8c4be83b6883 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Le=20Bihan?= Date: Sun, 23 May 2021 17:18:12 +0200 Subject: [PATCH 09/50] excluding tests folder form norm --- CPPLINT.cfg | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CPPLINT.cfg b/CPPLINT.cfg index 81525644..70f182a9 100644 --- a/CPPLINT.cfg +++ b/CPPLINT.cfg @@ -21,4 +21,5 @@ filer=-whitespace/indent # due to public class rule # TODO: this should be re-enabled. exclude_files=cmake-build-debug/* -exclude_files=build/* \ No newline at end of file +exclude_files=build/* +exclude_files=*/tests/* \ No newline at end of file From aee937f9aed2252927836e8fde5dd043dea2e6e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Le=20Bihan?= Date: Sun, 23 May 2021 17:34:13 +0200 Subject: [PATCH 10/50] fxing CPPLINT config file and more norm --- CPPLINT.cfg | 9 ++++----- lib/Ray/sources/Drawables/Image.hpp | 2 +- lib/wal/CPPLINT.cfg | 4 ++++ lib/wal/sources/Exception/WalError.cpp | 1 + lib/wal/sources/Exception/WalError.hpp | 1 + lib/wal/sources/Models/Callback.hpp | 6 ++++-- lib/wal/sources/Models/Vector3.hpp | 4 ++-- lib/wal/sources/System/System.cpp | 2 +- lib/wal/sources/System/System.hpp | 1 + lib/wal/sources/Wal.hpp | 1 - lib/wal/tests/CallbackTest.cpp | 2 +- sources/main.cpp | 2 +- 12 files changed, 21 insertions(+), 14 deletions(-) create mode 100644 lib/wal/CPPLINT.cfg diff --git a/CPPLINT.cfg b/CPPLINT.cfg index 70f182a9..bfbf40cd 100644 --- a/CPPLINT.cfg +++ b/CPPLINT.cfg @@ -15,11 +15,10 @@ filter=-runtime/indentation_namespace filter=-whitespace/ending_newline filter=-build/header_guard filter=-readability/todo -filer=-whitespace/indent # due to public class rule -#filter=-readability/function,-readability/streams,-readability/todo -#filter=-runtime/printf,-runtime/references,-runtime/sizeof,-runtime/threadsafe_fn -# TODO: this should be re-enabled. +filter=-whitespace/comments +filter=-whitespace/indent # due to public class rule + exclude_files=cmake-build-debug/* exclude_files=build/* -exclude_files=*/tests/* \ No newline at end of file +exclude_files=tests/* \ No newline at end of file diff --git a/lib/Ray/sources/Drawables/Image.hpp b/lib/Ray/sources/Drawables/Image.hpp index dae6385f..9e0097fe 100644 --- a/lib/Ray/sources/Drawables/Image.hpp +++ b/lib/Ray/sources/Drawables/Image.hpp @@ -39,7 +39,7 @@ namespace RAY //! @brief An image is assignable Image &operator=(const Image &image) = default; - + //! @brief Image destructor, will unload ressources ~Image() override; diff --git a/lib/wal/CPPLINT.cfg b/lib/wal/CPPLINT.cfg new file mode 100644 index 00000000..9992b3d2 --- /dev/null +++ b/lib/wal/CPPLINT.cfg @@ -0,0 +1,4 @@ +# Use 'ART_' as the cpp header guard prefix (e.g. #ifndef ART_PATH_TO_FILE_H_). +root=. + +exclude_files=tests/* \ No newline at end of file diff --git a/lib/wal/sources/Exception/WalError.cpp b/lib/wal/sources/Exception/WalError.cpp index 7a3d3b24..c1039567 100644 --- a/lib/wal/sources/Exception/WalError.cpp +++ b/lib/wal/sources/Exception/WalError.cpp @@ -2,6 +2,7 @@ // Created by Zoe Roux on 2021-05-14. // +#include #include "WalError.hpp" namespace WAL diff --git a/lib/wal/sources/Exception/WalError.hpp b/lib/wal/sources/Exception/WalError.hpp index 417ebbd7..d7c04c96 100644 --- a/lib/wal/sources/Exception/WalError.hpp +++ b/lib/wal/sources/Exception/WalError.hpp @@ -7,6 +7,7 @@ #include #include +#include namespace WAL { diff --git a/lib/wal/sources/Models/Callback.hpp b/lib/wal/sources/Models/Callback.hpp index 4b5ed23a..b43ebfb0 100644 --- a/lib/wal/sources/Models/Callback.hpp +++ b/lib/wal/sources/Models/Callback.hpp @@ -6,6 +6,8 @@ #pragma once #include +#include +#include namespace WAL { @@ -16,13 +18,13 @@ namespace WAL private: int _nextID = 0; //! @brief The list of functions to call. - std::unordered_map> _functions = {}; + std::unordered_map> _functions = {}; public: //! @brief Add a method to be called when this callback is invoked. //! @param callback The list of arguments of the callback method //! @return A unique ID for this callback. That can be used to remove the callback later. - int addCallback(std::function callback) + int addCallback(std::function callback) { int id = this->_nextID++; this->_functions[id] = std::move(callback); diff --git a/lib/wal/sources/Models/Vector3.hpp b/lib/wal/sources/Models/Vector3.hpp index 8ae6f2fe..0a43bbe7 100644 --- a/lib/wal/sources/Models/Vector3.hpp +++ b/lib/wal/sources/Models/Vector3.hpp @@ -157,11 +157,11 @@ namespace WAL typedef Vector3 Vector3f; typedef Vector3 Vector3u; typedef Vector3 Vector3i; -} +} // namespace WAL template std::ostream &operator<<(std::ostream &s, const WAL::Vector3 &v) { s << "Vector3<" << typeid(T).name() << ">("<< v.x << ", " << v.y << ", " << v.z << ")"; return s; -} // namespace WAL \ No newline at end of file +} \ No newline at end of file diff --git a/lib/wal/sources/System/System.cpp b/lib/wal/sources/System/System.cpp index 4cf91ac6..0dd69f30 100644 --- a/lib/wal/sources/System/System.cpp +++ b/lib/wal/sources/System/System.cpp @@ -3,7 +3,7 @@ // #include "System.hpp" - +#include #include namespace WAL diff --git a/lib/wal/sources/System/System.hpp b/lib/wal/sources/System/System.hpp index 98905ee9..59c82c4a 100644 --- a/lib/wal/sources/System/System.hpp +++ b/lib/wal/sources/System/System.hpp @@ -5,6 +5,7 @@ #pragma once #include +#include #include "Entity/Entity.hpp" namespace WAL diff --git a/lib/wal/sources/Wal.hpp b/lib/wal/sources/Wal.hpp index d4be58c5..18bca212 100644 --- a/lib/wal/sources/Wal.hpp +++ b/lib/wal/sources/Wal.hpp @@ -84,7 +84,6 @@ namespace WAL if (existing == this->_systems.end()) throw NotFoundError("A system of the type \"" + std::string(type.name()) + "\" could not be found."); return *static_cast(existing->get()); - } //! @brief Remove a system using it's type. diff --git a/lib/wal/tests/CallbackTest.cpp b/lib/wal/tests/CallbackTest.cpp index c0d43f15..534ca9f4 100644 --- a/lib/wal/tests/CallbackTest.cpp +++ b/lib/wal/tests/CallbackTest.cpp @@ -4,7 +4,7 @@ #include #include -#include +#include "Entity/Entity.hpp" #include "Models/Callback.hpp" using namespace WAL; diff --git a/sources/main.cpp b/sources/main.cpp index 29af56f6..bc091ba2 100644 --- a/sources/main.cpp +++ b/sources/main.cpp @@ -18,7 +18,7 @@ int main() wal.run(); return 0; } catch (const std::exception &ex) { -std::cerr << ex.what() << std::endl; + std::cerr << ex.what() << std::endl; return 84; } } From 61118bdec2755650a0f013ac609e1e069bbfd9c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Le=20Bihan?= Date: Sun, 23 May 2021 17:51:00 +0200 Subject: [PATCH 11/50] test (rm cpplint cfg files) --- CPPLINT.cfg => eCPPLINT.cfg | 0 lib/wal/{CPPLINT.cfg => eeCPPLINT.cfg} | 0 lib/wal/sources/Wal.cpp | 4 +--- 3 files changed, 1 insertion(+), 3 deletions(-) rename CPPLINT.cfg => eCPPLINT.cfg (100%) rename lib/wal/{CPPLINT.cfg => eeCPPLINT.cfg} (100%) diff --git a/CPPLINT.cfg b/eCPPLINT.cfg similarity index 100% rename from CPPLINT.cfg rename to eCPPLINT.cfg diff --git a/lib/wal/CPPLINT.cfg b/lib/wal/eeCPPLINT.cfg similarity index 100% rename from lib/wal/CPPLINT.cfg rename to lib/wal/eeCPPLINT.cfg diff --git a/lib/wal/sources/Wal.cpp b/lib/wal/sources/Wal.cpp index abda5061..a3b73d17 100644 --- a/lib/wal/sources/Wal.cpp +++ b/lib/wal/sources/Wal.cpp @@ -6,11 +6,9 @@ #include #include "Wal.hpp" -using namespace std::chrono_literals; - namespace WAL { - std::chrono::nanoseconds Wal::timestep = 8ms; + std::chrono::nanoseconds Wal::timestep = std::chrono::milliseconds(8); void Wal::run() { From 77d824e9be5db6ba4988659772cbb99e4c0a3a62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Le=20Bihan?= Date: Sun, 23 May 2021 18:44:15 +0200 Subject: [PATCH 12/50] re enable it --- eCPPLINT.cfg => CPPLINT.cfg | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename eCPPLINT.cfg => CPPLINT.cfg (100%) diff --git a/eCPPLINT.cfg b/CPPLINT.cfg similarity index 100% rename from eCPPLINT.cfg rename to CPPLINT.cfg From c9f27df7b4abb3c331479c72dcd2116e0ecc4b57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Le=20Bihan?= Date: Sun, 23 May 2021 18:54:03 +0200 Subject: [PATCH 13/50] adding our own github action for coding style --- .github/workflows/codingstyle.yml | 33 +++++++++++++++++++++++++++++++ .github/workflows/doc.yml | 28 +++++--------------------- 2 files changed, 38 insertions(+), 23 deletions(-) create mode 100644 .github/workflows/codingstyle.yml diff --git a/.github/workflows/codingstyle.yml b/.github/workflows/codingstyle.yml new file mode 100644 index 00000000..72838f50 --- /dev/null +++ b/.github/workflows/codingstyle.yml @@ -0,0 +1,33 @@ +name: Build +on: [push, pull_request] + +jobs: + Build: + name: "Build on ${{ matrix.name }}" + runs-on: ${{ matrix.os }} + if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository + strategy: + matrix: + include: + - os: ubuntu-latest + name: Linux + steps: + - uses: actions/checkout@v1 + with: + submodules: true + - name: Install Xorg lib + if: matrix.name == 'Linux' + run: | + sudo apt install -y libasound2-dev mesa-common-dev libx11-dev libxrandr-dev libxi-dev xorg-dev libgl1-mesa-dev libglu1-mesa-dev + - name: Update G++ + if: matrix.name == 'Linux' + run: sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-10 100 + - name: Build + run: | + mkdir build && cd build + cmake .. + cmake --build . + - name: CheckBinaryName + shell: bash + if: matrix.name == 'Linux' + run: test -f build/bomberman diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml index de0e84de..fbaa0e2b 100644 --- a/.github/workflows/doc.yml +++ b/.github/workflows/doc.yml @@ -1,31 +1,13 @@ name: Update the documentation - -on: - push: - branches: - - master - - workflow +on: [push] jobs: Building: runs-on: [ubuntu-latest] steps: - uses: actions/checkout@v1 - - name: Install Doxygen - run: sudo apt-get install -y doxygen graphviz - - name: Update the docs + - name: Install cpplint + run: pip install cpplint + - name: Check coding style run: | - rm -rf docs/* - doxygen Doxyfile - cd docs - git config --global user.email "${GITHUB_ACTOR}@github.com"; - git config --global user.name "${GITHUB_ACTOR}"; - git init - git add -A; - git commit -m "Deploying the documentation"; - git remote add origin https://${GITHUB_ACTOR}:${GITHUB_TOKEN}@${GITHUB_REPO}; - git checkout -b Documentation - git push --force origin Documentation; - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - GITHUB_REPO: "github.com/AnonymusRaccoon/Bomberman" \ No newline at end of file + cpplint --recursive --quiet --verbose=3 \ No newline at end of file From fa745db44b325bd05e99ba6ef2a25fa065853899 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Le=20Bihan?= Date: Sun, 23 May 2021 18:55:20 +0200 Subject: [PATCH 14/50] fix coding style CI --- .github/workflows/doc.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml index fbaa0e2b..c8456f8d 100644 --- a/.github/workflows/doc.yml +++ b/.github/workflows/doc.yml @@ -1,4 +1,4 @@ -name: Update the documentation +name: Check coding style on: [push] jobs: @@ -10,4 +10,4 @@ jobs: run: pip install cpplint - name: Check coding style run: | - cpplint --recursive --quiet --verbose=3 \ No newline at end of file + cpplint --recursive --quiet --verbose=3 . \ No newline at end of file From 8f304f958c79b48687bca52c2e7d47e262f07f07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Le=20Bihan?= Date: Sun, 23 May 2021 19:06:26 +0200 Subject: [PATCH 15/50] testing something with comments --- .github/workflows/doc.yml | 10 +++++++++- lib/wal/{eeCPPLINT.cfg => CPPLINT.cfg} | 0 2 files changed, 9 insertions(+), 1 deletion(-) rename lib/wal/{eeCPPLINT.cfg => CPPLINT.cfg} (100%) diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml index c8456f8d..00eb2ea7 100644 --- a/.github/workflows/doc.yml +++ b/.github/workflows/doc.yml @@ -10,4 +10,12 @@ jobs: run: pip install cpplint - name: Check coding style run: | - cpplint --recursive --quiet --verbose=3 . \ No newline at end of file + cpplint --recursive --quiet --verbose=3 . 2> tmp + - name: Comment PR + uses: thollander/actions-comment-pull-request@master + if: ${{ github.event_name == 'pull_request' }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + message: ${{ cat tmp }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/lib/wal/eeCPPLINT.cfg b/lib/wal/CPPLINT.cfg similarity index 100% rename from lib/wal/eeCPPLINT.cfg rename to lib/wal/CPPLINT.cfg From e8e496ae8c936fe95b8f33e78f26d5cd83276434 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Le=20Bihan?= Date: Sun, 23 May 2021 19:12:18 +0200 Subject: [PATCH 16/50] fxing nameing issue --- .github/workflows/codingstyle.yml | 39 +++++++++---------------------- .github/workflows/doc.yml | 34 +++++++++++++++++---------- 2 files changed, 33 insertions(+), 40 deletions(-) diff --git a/.github/workflows/codingstyle.yml b/.github/workflows/codingstyle.yml index 72838f50..45a271d7 100644 --- a/.github/workflows/codingstyle.yml +++ b/.github/workflows/codingstyle.yml @@ -1,33 +1,16 @@ -name: Build -on: [push, pull_request] +name: Check coding style +on: [push] jobs: - Build: - name: "Build on ${{ matrix.name }}" - runs-on: ${{ matrix.os }} - if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository - strategy: - matrix: - include: - - os: ubuntu-latest - name: Linux + Building: + runs-on: [ubuntu-latest] steps: - uses: actions/checkout@v1 - with: - submodules: true - - name: Install Xorg lib - if: matrix.name == 'Linux' + - name: Install cpplint + run: pip install cpplint + - name: Run cpplint run: | - sudo apt install -y libasound2-dev mesa-common-dev libx11-dev libxrandr-dev libxi-dev xorg-dev libgl1-mesa-dev libglu1-mesa-dev - - name: Update G++ - if: matrix.name == 'Linux' - run: sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-10 100 - - name: Build - run: | - mkdir build && cd build - cmake .. - cmake --build . - - name: CheckBinaryName - shell: bash - if: matrix.name == 'Linux' - run: test -f build/bomberman + cpplint --recursive --quiet --verbose=3 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_REPO: "github.com/AnonymusRaccoon/Bomberman" \ No newline at end of file diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml index 00eb2ea7..de0e84de 100644 --- a/.github/workflows/doc.yml +++ b/.github/workflows/doc.yml @@ -1,21 +1,31 @@ -name: Check coding style -on: [push] +name: Update the documentation + +on: + push: + branches: + - master + - workflow jobs: Building: runs-on: [ubuntu-latest] steps: - uses: actions/checkout@v1 - - name: Install cpplint - run: pip install cpplint - - name: Check coding style + - name: Install Doxygen + run: sudo apt-get install -y doxygen graphviz + - name: Update the docs run: | - cpplint --recursive --quiet --verbose=3 . 2> tmp - - name: Comment PR - uses: thollander/actions-comment-pull-request@master - if: ${{ github.event_name == 'pull_request' }} + rm -rf docs/* + doxygen Doxyfile + cd docs + git config --global user.email "${GITHUB_ACTOR}@github.com"; + git config --global user.name "${GITHUB_ACTOR}"; + git init + git add -A; + git commit -m "Deploying the documentation"; + git remote add origin https://${GITHUB_ACTOR}:${GITHUB_TOKEN}@${GITHUB_REPO}; + git checkout -b Documentation + git push --force origin Documentation; env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - message: ${{ cat tmp }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + GITHUB_REPO: "github.com/AnonymusRaccoon/Bomberman" \ No newline at end of file From 0f7a47af88f16c9b5061e980799a404ffa68a7ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Le=20Bihan?= Date: Sun, 23 May 2021 19:14:07 +0200 Subject: [PATCH 17/50] ... :| --- .github/workflows/codingstyle.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/codingstyle.yml b/.github/workflows/codingstyle.yml index 45a271d7..46c8bc56 100644 --- a/.github/workflows/codingstyle.yml +++ b/.github/workflows/codingstyle.yml @@ -10,7 +10,7 @@ jobs: run: pip install cpplint - name: Run cpplint run: | - cpplint --recursive --quiet --verbose=3 + cpplint --recursive --quiet --verbose=3 . env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_REPO: "github.com/AnonymusRaccoon/Bomberman" \ No newline at end of file From 3ba85122f591b083e7389638267d437f0c0f9b7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Le=20Bihan?= Date: Sun, 23 May 2021 19:22:22 +0200 Subject: [PATCH 18/50] test --- .github/workflows/codingstyle.yml | 11 +++++++---- sources/main.cpp | 2 ++ 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/codingstyle.yml b/.github/workflows/codingstyle.yml index 46c8bc56..e3a63dc5 100644 --- a/.github/workflows/codingstyle.yml +++ b/.github/workflows/codingstyle.yml @@ -10,7 +10,10 @@ jobs: run: pip install cpplint - name: Run cpplint run: | - cpplint --recursive --quiet --verbose=3 . - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - GITHUB_REPO: "github.com/AnonymusRaccoon/Bomberman" \ No newline at end of file + cpplint --recursive --quiet --verbose=3 . 2 > tmp + - name: Comment PR + if: ${{ failure() && github.event_name == 'pull_request' }} + uses: thollander/actions-comment-pull-request@master + with: + message: ${{ cat tmp }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/sources/main.cpp b/sources/main.cpp index bc091ba2..3c673dab 100644 --- a/sources/main.cpp +++ b/sources/main.cpp @@ -10,6 +10,8 @@ #include #include "Wal.hpp" +using namespace std; + int main() { WAL::Wal wal; From 21b79e6bffa37adf4a91774e6c83daf96435da93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Le=20Bihan?= Date: Sun, 23 May 2021 19:23:52 +0200 Subject: [PATCH 19/50] fix ci --- .github/workflows/codingstyle.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/codingstyle.yml b/.github/workflows/codingstyle.yml index e3a63dc5..d2912485 100644 --- a/.github/workflows/codingstyle.yml +++ b/.github/workflows/codingstyle.yml @@ -6,6 +6,7 @@ jobs: runs-on: [ubuntu-latest] steps: - uses: actions/checkout@v1 + - uses: thollander/actions-comment-pull-request@master - name: Install cpplint run: pip install cpplint - name: Run cpplint @@ -13,7 +14,6 @@ jobs: cpplint --recursive --quiet --verbose=3 . 2 > tmp - name: Comment PR if: ${{ failure() && github.event_name == 'pull_request' }} - uses: thollander/actions-comment-pull-request@master with: - message: ${{ cat tmp }} + message: '${{ cat tmp }}' GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file From b7e60bb2e34483ed1c149106ada1d29302a12a39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Le=20Bihan?= Date: Sun, 23 May 2021 19:27:32 +0200 Subject: [PATCH 20/50] fix ci --- .github/workflows/codingstyle.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/codingstyle.yml b/.github/workflows/codingstyle.yml index d2912485..62706689 100644 --- a/.github/workflows/codingstyle.yml +++ b/.github/workflows/codingstyle.yml @@ -6,13 +6,13 @@ jobs: runs-on: [ubuntu-latest] steps: - uses: actions/checkout@v1 - - uses: thollander/actions-comment-pull-request@master - name: Install cpplint run: pip install cpplint - name: Run cpplint run: | cpplint --recursive --quiet --verbose=3 . 2 > tmp - - name: Comment PR + - name: Comment Pull Request + uses: thollander/actions-comment-pull-request@1.0.1 if: ${{ failure() && github.event_name == 'pull_request' }} with: message: '${{ cat tmp }}' From ddb1ed7ffcff6c8b48458dad64816f22d59fad76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Le=20Bihan?= Date: Sun, 23 May 2021 19:28:25 +0200 Subject: [PATCH 21/50] fix ci (base exemple) --- .github/workflows/codingstyle.yml | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/.github/workflows/codingstyle.yml b/.github/workflows/codingstyle.yml index 62706689..932a482d 100644 --- a/.github/workflows/codingstyle.yml +++ b/.github/workflows/codingstyle.yml @@ -5,15 +5,11 @@ jobs: Building: runs-on: [ubuntu-latest] steps: - - uses: actions/checkout@v1 - - name: Install cpplint - run: pip install cpplint - - name: Run cpplint - run: | - cpplint --recursive --quiet --verbose=3 . 2 > tmp - - name: Comment Pull Request - uses: thollander/actions-comment-pull-request@1.0.1 - if: ${{ failure() && github.event_name == 'pull_request' }} + - name: Checkout + uses: actions/checkout@v1 + + - name: Comment PR + uses: thollander/actions-comment-pull-request@master with: - message: '${{ cat tmp }}' + message: 'Example of message !' GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file From 9eba94ff9c687607ff352f0318bd302259c96c1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Le=20Bihan?= Date: Sun, 23 May 2021 19:30:00 +0200 Subject: [PATCH 22/50] use realease instead of master --- .github/workflows/codingstyle.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/codingstyle.yml b/.github/workflows/codingstyle.yml index 932a482d..1eb20438 100644 --- a/.github/workflows/codingstyle.yml +++ b/.github/workflows/codingstyle.yml @@ -8,8 +8,8 @@ jobs: - name: Checkout uses: actions/checkout@v1 - - name: Comment PR - uses: thollander/actions-comment-pull-request@master + - name: Comment Pull Request + uses: thollander/actions-comment-pull-request@1.0.1 with: message: 'Example of message !' GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file From 813372cae5127103557458b8cf94882dd5e096ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Le=20Bihan?= Date: Sun, 23 May 2021 19:34:41 +0200 Subject: [PATCH 23/50] use realease instead of master ? --- .github/workflows/codingstyle.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/codingstyle.yml b/.github/workflows/codingstyle.yml index 1eb20438..2dbc4b4e 100644 --- a/.github/workflows/codingstyle.yml +++ b/.github/workflows/codingstyle.yml @@ -1,15 +1,15 @@ -name: Check coding style -on: [push] +on: pull_request jobs: - Building: - runs-on: [ubuntu-latest] + example_comment_pr: + runs-on: ubuntu-latest + name: An example job to comment a PR steps: - name: Checkout uses: actions/checkout@v1 - - name: Comment Pull Request - uses: thollander/actions-comment-pull-request@1.0.1 + - name: Comment PR + uses: thollander/actions-comment-pull-request@master with: message: 'Example of message !' GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file From d67bb194e9f02d015f3c8d714cb5889fa5377860 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Le=20Bihan?= Date: Sun, 23 May 2021 19:36:22 +0200 Subject: [PATCH 24/50] test --- .github/workflows/codingstyle.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/codingstyle.yml b/.github/workflows/codingstyle.yml index 2dbc4b4e..8f64653f 100644 --- a/.github/workflows/codingstyle.yml +++ b/.github/workflows/codingstyle.yml @@ -1,15 +1,15 @@ -on: pull_request +name: Check coding style +on: [push, pull_request] jobs: - example_comment_pr: - runs-on: ubuntu-latest - name: An example job to comment a PR + Building: + runs-on: [ubuntu-latest] steps: - name: Checkout uses: actions/checkout@v1 - - name: Comment PR - uses: thollander/actions-comment-pull-request@master + - name: Comment Pull Request + uses: thollander/actions-comment-pull-request@1.0.1 with: message: 'Example of message !' GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file From 1e72198868a6602bd4d34351fbb83d3f9b914e2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Le=20Bihan?= Date: Sun, 23 May 2021 19:39:37 +0200 Subject: [PATCH 25/50] final tests --- .github/workflows/codingstyle.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/codingstyle.yml b/.github/workflows/codingstyle.yml index 8f64653f..30e21ca7 100644 --- a/.github/workflows/codingstyle.yml +++ b/.github/workflows/codingstyle.yml @@ -7,9 +7,15 @@ jobs: steps: - name: Checkout uses: actions/checkout@v1 + - name: Install cpplint + run: pip install cpplint + - name: Check coding style + run: | + cpplint --recursive --quiet --verbose=3 . 2> tmp - name: Comment Pull Request uses: thollander/actions-comment-pull-request@1.0.1 + if: ${{ failure() && github.event_name == 'pull_request' }} with: - message: 'Example of message !' + message: ${{ cat tmp }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file From ea8bdd1937bdf018020e6c7562970a1b5d7d62f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Le=20Bihan?= Date: Sun, 23 May 2021 19:41:04 +0200 Subject: [PATCH 26/50] ??? --- .github/workflows/codingstyle.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/codingstyle.yml b/.github/workflows/codingstyle.yml index 30e21ca7..1a17710d 100644 --- a/.github/workflows/codingstyle.yml +++ b/.github/workflows/codingstyle.yml @@ -17,5 +17,5 @@ jobs: uses: thollander/actions-comment-pull-request@1.0.1 if: ${{ failure() && github.event_name == 'pull_request' }} with: - message: ${{ cat tmp }} + message: '${{ cat tmp }}' GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file From c8952ebcfb547f6b736826853e73ccba3f8e1725 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Le=20Bihan?= Date: Sun, 23 May 2021 19:41:49 +0200 Subject: [PATCH 27/50] not seeing the action --- .github/workflows/codingstyle.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/codingstyle.yml b/.github/workflows/codingstyle.yml index 1a17710d..57c49a4d 100644 --- a/.github/workflows/codingstyle.yml +++ b/.github/workflows/codingstyle.yml @@ -9,13 +9,11 @@ jobs: uses: actions/checkout@v1 - name: Install cpplint run: pip install cpplint - - name: Check coding style - run: | - cpplint --recursive --quiet --verbose=3 . 2> tmp + - name: Comment Pull Request uses: thollander/actions-comment-pull-request@1.0.1 - if: ${{ failure() && github.event_name == 'pull_request' }} + if: ${{ github.event_name == 'pull_request' }} with: message: '${{ cat tmp }}' GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file From 5d178bbc596016598226efe693535dc1b329cd1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Le=20Bihan?= Date: Sun, 23 May 2021 19:42:44 +0200 Subject: [PATCH 28/50] rm even more --- .github/workflows/codingstyle.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/codingstyle.yml b/.github/workflows/codingstyle.yml index 57c49a4d..4d90dd0e 100644 --- a/.github/workflows/codingstyle.yml +++ b/.github/workflows/codingstyle.yml @@ -7,9 +7,6 @@ jobs: steps: - name: Checkout uses: actions/checkout@v1 - - name: Install cpplint - run: pip install cpplint - - name: Comment Pull Request uses: thollander/actions-comment-pull-request@1.0.1 From c08b12d76ae815ce5ac6cb5be74e6151130b1052 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Le=20Bihan?= Date: Sun, 23 May 2021 19:43:25 +0200 Subject: [PATCH 29/50] rm even more if --- .github/workflows/codingstyle.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/codingstyle.yml b/.github/workflows/codingstyle.yml index 4d90dd0e..00fc9f68 100644 --- a/.github/workflows/codingstyle.yml +++ b/.github/workflows/codingstyle.yml @@ -10,7 +10,6 @@ jobs: - name: Comment Pull Request uses: thollander/actions-comment-pull-request@1.0.1 - if: ${{ github.event_name == 'pull_request' }} with: message: '${{ cat tmp }}' GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file From e09ce72119fb6e1d6c0ada44b8822d2b57d1fca5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Le=20Bihan?= Date: Sun, 23 May 2021 19:47:02 +0200 Subject: [PATCH 30/50] simple cpplint --- .github/workflows/codingstyle.yml | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/.github/workflows/codingstyle.yml b/.github/workflows/codingstyle.yml index 00fc9f68..c8456f8d 100644 --- a/.github/workflows/codingstyle.yml +++ b/.github/workflows/codingstyle.yml @@ -1,15 +1,13 @@ name: Check coding style -on: [push, pull_request] +on: [push] jobs: Building: runs-on: [ubuntu-latest] steps: - - name: Checkout - uses: actions/checkout@v1 - - - name: Comment Pull Request - uses: thollander/actions-comment-pull-request@1.0.1 - with: - message: '${{ cat tmp }}' - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + - uses: actions/checkout@v1 + - name: Install cpplint + run: pip install cpplint + - name: Check coding style + run: | + cpplint --recursive --quiet --verbose=3 . \ No newline at end of file From 06d2db629bf4c573b31a75e373458a3e4789a345 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Le=20Bihan?= Date: Sun, 23 May 2021 19:53:24 +0200 Subject: [PATCH 31/50] retry comment --- .github/workflows/codingstyle.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/codingstyle.yml b/.github/workflows/codingstyle.yml index c8456f8d..cad23f83 100644 --- a/.github/workflows/codingstyle.yml +++ b/.github/workflows/codingstyle.yml @@ -1,5 +1,5 @@ name: Check coding style -on: [push] +on: [push, pull_request] jobs: Building: @@ -10,4 +10,9 @@ jobs: run: pip install cpplint - name: Check coding style run: | - cpplint --recursive --quiet --verbose=3 . \ No newline at end of file + cpplint --recursive --quiet --verbose=3 . + - name: Comment PR + uses: thollander/actions-comment-pull-request@master + with: + message: 'Example of message !' + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file From 6d8f14f50dbfb61324c603a5939aaa17285b83ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Le=20Bihan?= Date: Sun, 23 May 2021 19:55:51 +0200 Subject: [PATCH 32/50] try --- .github/workflows/codingstyle.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/codingstyle.yml b/.github/workflows/codingstyle.yml index cad23f83..24ef3b07 100644 --- a/.github/workflows/codingstyle.yml +++ b/.github/workflows/codingstyle.yml @@ -12,6 +12,7 @@ jobs: run: | cpplint --recursive --quiet --verbose=3 . - name: Comment PR + if: ${{ failure() }} uses: thollander/actions-comment-pull-request@master with: message: 'Example of message !' From e16df50b5e129980727be56fe28694e8315f8c95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Le=20Bihan?= Date: Sun, 23 May 2021 20:31:05 +0200 Subject: [PATCH 33/50] try tmp --- .github/workflows/codingstyle.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/codingstyle.yml b/.github/workflows/codingstyle.yml index 24ef3b07..48f67b37 100644 --- a/.github/workflows/codingstyle.yml +++ b/.github/workflows/codingstyle.yml @@ -10,10 +10,10 @@ jobs: run: pip install cpplint - name: Check coding style run: | - cpplint --recursive --quiet --verbose=3 . + cpplint --recursive --quiet --verbose=3 . 2> tmp - name: Comment PR - if: ${{ failure() }} + if: ${{ failure() && github.event_name == 'pull_request' }} uses: thollander/actions-comment-pull-request@master with: - message: 'Example of message !' + message: ${{ cat tmp }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file From 2fb7bb54ff7bf87e8d5a107f21b4f944f55e9341 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Le=20Bihan?= Date: Sun, 23 May 2021 20:32:14 +0200 Subject: [PATCH 34/50] rm cat --- .github/workflows/codingstyle.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/codingstyle.yml b/.github/workflows/codingstyle.yml index 48f67b37..be6885cc 100644 --- a/.github/workflows/codingstyle.yml +++ b/.github/workflows/codingstyle.yml @@ -15,5 +15,5 @@ jobs: if: ${{ failure() && github.event_name == 'pull_request' }} uses: thollander/actions-comment-pull-request@master with: - message: ${{ cat tmp }} + message: '${{ cat tmp }}' GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file From 98d869058efd9eb8c577b26f905fe7bf5afa6744 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Le=20Bihan?= Date: Sun, 23 May 2021 20:32:55 +0200 Subject: [PATCH 35/50] rm redirection --- .github/workflows/codingstyle.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/codingstyle.yml b/.github/workflows/codingstyle.yml index be6885cc..d68e91c0 100644 --- a/.github/workflows/codingstyle.yml +++ b/.github/workflows/codingstyle.yml @@ -10,7 +10,7 @@ jobs: run: pip install cpplint - name: Check coding style run: | - cpplint --recursive --quiet --verbose=3 . 2> tmp + cpplint --recursive --quiet --verbose=3 . - name: Comment PR if: ${{ failure() && github.event_name == 'pull_request' }} uses: thollander/actions-comment-pull-request@master From aa24ae0ddf39628d1f5b1c16f17722b9f61fc26a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Le=20Bihan?= Date: Sun, 23 May 2021 20:33:42 +0200 Subject: [PATCH 36/50] rm if --- .github/workflows/codingstyle.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/codingstyle.yml b/.github/workflows/codingstyle.yml index d68e91c0..a7389f10 100644 --- a/.github/workflows/codingstyle.yml +++ b/.github/workflows/codingstyle.yml @@ -12,7 +12,7 @@ jobs: run: | cpplint --recursive --quiet --verbose=3 . - name: Comment PR - if: ${{ failure() && github.event_name == 'pull_request' }} + if: ${{ failure() }} uses: thollander/actions-comment-pull-request@master with: message: '${{ cat tmp }}' From fcdbd79576fc15f39f00efe541b1dc580e49d58e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Le=20Bihan?= Date: Sun, 23 May 2021 20:34:26 +0200 Subject: [PATCH 37/50] plain text --- .github/workflows/codingstyle.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/codingstyle.yml b/.github/workflows/codingstyle.yml index a7389f10..09adfccb 100644 --- a/.github/workflows/codingstyle.yml +++ b/.github/workflows/codingstyle.yml @@ -15,5 +15,5 @@ jobs: if: ${{ failure() }} uses: thollander/actions-comment-pull-request@master with: - message: '${{ cat tmp }}' + message: 'cat tmp' GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file From 28eb2ee605b1b65641d4bcded389e9a245c42e26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Le=20Bihan?= Date: Sun, 23 May 2021 20:35:25 +0200 Subject: [PATCH 38/50] true --- .github/workflows/codingstyle.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/codingstyle.yml b/.github/workflows/codingstyle.yml index 09adfccb..3129a51b 100644 --- a/.github/workflows/codingstyle.yml +++ b/.github/workflows/codingstyle.yml @@ -10,10 +10,10 @@ jobs: run: pip install cpplint - name: Check coding style run: | - cpplint --recursive --quiet --verbose=3 . + cpplint --recursive --quiet --verbose=3 . 2> tmp - name: Comment PR - if: ${{ failure() }} + if: ${{ failure() && github.event_name == 'pull_request' }} uses: thollander/actions-comment-pull-request@master with: - message: 'cat tmp' + message: ${{ github.event_name }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file From 6b2fc01ceec2212be16c12ca2c1eb09f07827f49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Le=20Bihan?= Date: Sun, 23 May 2021 20:36:51 +0200 Subject: [PATCH 39/50] try only push --- .github/workflows/codingstyle.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/codingstyle.yml b/.github/workflows/codingstyle.yml index 3129a51b..ef1825d7 100644 --- a/.github/workflows/codingstyle.yml +++ b/.github/workflows/codingstyle.yml @@ -1,5 +1,5 @@ name: Check coding style -on: [push, pull_request] +on: [push] jobs: Building: From b929ec9c2eda9ebefbc480c49660959f6233f77a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Le=20Bihan?= Date: Sun, 23 May 2021 20:43:25 +0200 Subject: [PATCH 40/50] should work --- .github/workflows/codingstyle.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/codingstyle.yml b/.github/workflows/codingstyle.yml index ef1825d7..13263512 100644 --- a/.github/workflows/codingstyle.yml +++ b/.github/workflows/codingstyle.yml @@ -1,5 +1,5 @@ name: Check coding style -on: [push] +on: [push, pull_request] jobs: Building: @@ -11,9 +11,10 @@ jobs: - name: Check coding style run: | cpplint --recursive --quiet --verbose=3 . 2> tmp + echo "CPP_LINT_LOG=$(cat tmp)" >> $GITHUB_ENV - name: Comment PR if: ${{ failure() && github.event_name == 'pull_request' }} uses: thollander/actions-comment-pull-request@master with: - message: ${{ github.event_name }} + message: ${{ env.CPP_LINT_LOG }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file From d45f7673dc3e2749d80dbf4f41925503dc8410e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Le=20Bihan?= Date: Sun, 23 May 2021 20:48:35 +0200 Subject: [PATCH 41/50] check if blank --- .github/workflows/codingstyle.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/codingstyle.yml b/.github/workflows/codingstyle.yml index 13263512..a9e72a1a 100644 --- a/.github/workflows/codingstyle.yml +++ b/.github/workflows/codingstyle.yml @@ -11,6 +11,8 @@ jobs: - name: Check coding style run: | cpplint --recursive --quiet --verbose=3 . 2> tmp + cat tmp + ls >> tmp echo "CPP_LINT_LOG=$(cat tmp)" >> $GITHUB_ENV - name: Comment PR if: ${{ failure() && github.event_name == 'pull_request' }} From d0304bd482e389396d81ed98362a59d9eb6e27c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Le=20Bihan?= Date: Sun, 23 May 2021 20:58:56 +0200 Subject: [PATCH 42/50] should finally work fine --- .github/workflows/codingstyle.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/codingstyle.yml b/.github/workflows/codingstyle.yml index a9e72a1a..3a02fb4b 100644 --- a/.github/workflows/codingstyle.yml +++ b/.github/workflows/codingstyle.yml @@ -10,10 +10,7 @@ jobs: run: pip install cpplint - name: Check coding style run: | - cpplint --recursive --quiet --verbose=3 . 2> tmp - cat tmp - ls >> tmp - echo "CPP_LINT_LOG=$(cat tmp)" >> $GITHUB_ENV + cpplint --recursive --quiet --verbose=3 . 2> tmp || (echo "CPP_LINT_LOG=$(cat tmp)" >> $GITHUB_ENV && false) - name: Comment PR if: ${{ failure() && github.event_name == 'pull_request' }} uses: thollander/actions-comment-pull-request@master From c4b8002c55a6e7feb2a64c24eb8666aa3a280db1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Le=20Bihan?= Date: Sun, 23 May 2021 21:00:47 +0200 Subject: [PATCH 43/50] test with more lines --- .github/workflows/codingstyle.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/codingstyle.yml b/.github/workflows/codingstyle.yml index 3a02fb4b..cf4a2fb3 100644 --- a/.github/workflows/codingstyle.yml +++ b/.github/workflows/codingstyle.yml @@ -10,7 +10,7 @@ jobs: run: pip install cpplint - name: Check coding style run: | - cpplint --recursive --quiet --verbose=3 . 2> tmp || (echo "CPP_LINT_LOG=$(cat tmp)" >> $GITHUB_ENV && false) + cpplint --recursive --quiet . 2> tmp || (echo "CPP_LINT_LOG=$(cat tmp)" >> $GITHUB_ENV && false) - name: Comment PR if: ${{ failure() && github.event_name == 'pull_request' }} uses: thollander/actions-comment-pull-request@master From 8df13c57a8f3fb60961e19d8d6f3753737db0c99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Le=20Bihan?= Date: Sun, 23 May 2021 21:02:57 +0200 Subject: [PATCH 44/50] debug messages --- .github/workflows/codingstyle.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/codingstyle.yml b/.github/workflows/codingstyle.yml index cf4a2fb3..adc1fe36 100644 --- a/.github/workflows/codingstyle.yml +++ b/.github/workflows/codingstyle.yml @@ -10,7 +10,7 @@ jobs: run: pip install cpplint - name: Check coding style run: | - cpplint --recursive --quiet . 2> tmp || (echo "CPP_LINT_LOG=$(cat tmp)" >> $GITHUB_ENV && false) + cpplint --recursive --quiet . 2> tmp || (echo "CPP_LINT_LOG=$(cat tmp)" >> $GITHUB_ENV && cat tmp && false) - name: Comment PR if: ${{ failure() && github.event_name == 'pull_request' }} uses: thollander/actions-comment-pull-request@master From 1ad1e797bbdaa7c7f4d8fd38442ed0b6a39b4c31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Le=20Bihan?= Date: Sun, 23 May 2021 21:05:48 +0200 Subject: [PATCH 45/50] rm useless stuff --- .github/workflows/codingstyle.yml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/codingstyle.yml b/.github/workflows/codingstyle.yml index adc1fe36..aeb1fc15 100644 --- a/.github/workflows/codingstyle.yml +++ b/.github/workflows/codingstyle.yml @@ -10,10 +10,4 @@ jobs: run: pip install cpplint - name: Check coding style run: | - cpplint --recursive --quiet . 2> tmp || (echo "CPP_LINT_LOG=$(cat tmp)" >> $GITHUB_ENV && cat tmp && false) - - name: Comment PR - if: ${{ failure() && github.event_name == 'pull_request' }} - uses: thollander/actions-comment-pull-request@master - with: - message: ${{ env.CPP_LINT_LOG }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + cpplint --recursive --quiet --verbose=3 . \ No newline at end of file From e8b57bb3347d7dcedaa5085d0434d84784a007af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Le=20Bihan?= Date: Sun, 23 May 2021 21:05:57 +0200 Subject: [PATCH 46/50] ... --- .github/workflows/codingstyle.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/codingstyle.yml b/.github/workflows/codingstyle.yml index aeb1fc15..c8456f8d 100644 --- a/.github/workflows/codingstyle.yml +++ b/.github/workflows/codingstyle.yml @@ -1,5 +1,5 @@ name: Check coding style -on: [push, pull_request] +on: [push] jobs: Building: From 45cbe375366db8246a039032d72ab11b3bc9a4dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Le=20Bihan?= Date: Sun, 23 May 2021 21:06:46 +0200 Subject: [PATCH 47/50] rm issue --- sources/main.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/sources/main.cpp b/sources/main.cpp index 3c673dab..bc091ba2 100644 --- a/sources/main.cpp +++ b/sources/main.cpp @@ -10,8 +10,6 @@ #include #include "Wal.hpp" -using namespace std; - int main() { WAL::Wal wal; From 806fe0d3fadf15c70bb22cb8600b36252f7d171d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Le=20Bihan?= Date: Mon, 24 May 2021 09:29:36 +0200 Subject: [PATCH 48/50] desactivate cpplint.cfg --- CPPLINT.cfg => eCPPLINT.cfg | 0 lib/wal/{CPPLINT.cfg => eCPPLINT.cfg} | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename CPPLINT.cfg => eCPPLINT.cfg (100%) rename lib/wal/{CPPLINT.cfg => eCPPLINT.cfg} (100%) diff --git a/CPPLINT.cfg b/eCPPLINT.cfg similarity index 100% rename from CPPLINT.cfg rename to eCPPLINT.cfg diff --git a/lib/wal/CPPLINT.cfg b/lib/wal/eCPPLINT.cfg similarity index 100% rename from lib/wal/CPPLINT.cfg rename to lib/wal/eCPPLINT.cfg From 5ee08e374b20a1c4e429b676d61983245e3e6420 Mon Sep 17 00:00:00 2001 From: Zoe Roux Date: Mon, 24 May 2021 12:19:35 +0200 Subject: [PATCH 49/50] Create README.md --- README.md | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 00000000..67b0e2dd --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# Bomberman + +Repository link: https://github.com/AnonymusRaccoon/Bomberman/ From 01ec0cbf05a1437e7924519e4ca6e8294b9867f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Le=20Bihan?= Date: Tue, 25 May 2021 09:46:06 +0200 Subject: [PATCH 50/50] reputting spaces --- lib/wal/sources/Models/Callback.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/wal/sources/Models/Callback.hpp b/lib/wal/sources/Models/Callback.hpp index b43ebfb0..26dbe575 100644 --- a/lib/wal/sources/Models/Callback.hpp +++ b/lib/wal/sources/Models/Callback.hpp @@ -18,13 +18,13 @@ namespace WAL private: int _nextID = 0; //! @brief The list of functions to call. - std::unordered_map> _functions = {}; + std::unordered_map> _functions = {}; public: //! @brief Add a method to be called when this callback is invoked. //! @param callback The list of arguments of the callback method //! @return A unique ID for this callback. That can be used to remove the callback later. - int addCallback(std::function callback) + int addCallback(std::function callback) { int id = this->_nextID++; this->_functions[id] = std::move(callback);