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

[#148]: Fix issues with Ubuntu docker build #149

Merged
merged 4 commits into from
Oct 27, 2023

Conversation

JacobDomagala
Copy link
Owner

Fixes #148

@JacobDomagala JacobDomagala self-assigned this Oct 27, 2023
@JacobDomagala JacobDomagala linked an issue Oct 27, 2023 that may be closed by this pull request
@github-actions
Copy link

✅ UBUNTU COMPILE RESULT - SUCCESS! ✅

@github-actions
Copy link

✅ WINDOWS COMPILE RESULT - SUCCESS! ✅

@github-actions
Copy link

github-actions bot commented Oct 27, 2023

⚡ Static analysis result ⚡

🔴 cppcheck found 27 issues! Click here to see details.

Looper/editor/editor.hpp

Lines 121 to 126 in 085896a

DrawGrid();
void
DrawBoundingBoxes();
void

!Line: 121 - style: inconclusive: Technically the member function 'looper::Editor::DrawGrid' can be const. [functionConst]
!Line: 714 - note: Technically the member function 'looper::Editor::DrawGrid' can be const.
!Line: 121 - note: Technically the member function 'looper::Editor::DrawGrid' can be const.

Looper/editor/editor.hpp

Lines 215 to 220 in 085896a

SetMouseOnObject();
void
SetupPathfinderNodes();
void

!Line: 215 - style: inconclusive: Technically the member function 'looper::Editor::SetMouseOnObject' can be const. [functionConst]
!Line: 249 - note: Technically the member function 'looper::Editor::SetMouseOnObject' can be const.
!Line: 215 - note: Technically the member function 'looper::Editor::SetMouseOnObject' can be const.

Hit(int32_t /*dmg*/) override
{
}
private:
void

!Line: 61 - style: The function 'Hit' overrides a function in a base class but is identical to the overridden function [uselessOverride]
!Line: 22 - note: Virtual function in base class
!Line: 61 - note: Function in derived class

Hit(int32_t /*dmg*/) override
{
}
private:
void

!Line: 61 - style: The function 'Hit' overrides a function in a base class but is identical to the overridden function [uselessOverride]
!Line: 22 - note: Virtual function in base class
!Line: 61 - note: Function in derived class

Hit(int32_t /*dmg*/) override
{
}
private:
void

!Line: 61 - style: The function 'Hit' overrides a function in a base class but is identical to the overridden function [uselessOverride]
!Line: 22 - note: Virtual function in base class
!Line: 61 - note: Function in derived class

Hit(int32_t /*dmg*/) override
{
}
private:
void

!Line: 61 - style: The function 'Hit' overrides a function in a base class but is identical to the overridden function [uselessOverride]
!Line: 22 - note: Virtual function in base class
!Line: 61 - note: Function in derived class

Hit(int32_t /*dmg*/) override
{
}
private:
void

!Line: 61 - style: The function 'Hit' overrides a function in a base class but is identical to the overridden function [uselessOverride]
!Line: 22 - note: Virtual function in base class
!Line: 61 - note: Function in derived class

Hit(int32_t /*dmg*/) override
{
}
private:
void

!Line: 61 - style: The function 'Hit' overrides a function in a base class but is identical to the overridden function [uselessOverride]
!Line: 22 - note: Virtual function in base class
!Line: 61 - note: Function in derived class

Hit(int32_t /*dmg*/) override
{
}
private:
void

!Line: 61 - style: The function 'Hit' overrides a function in a base class but is identical to the overridden function [uselessOverride]
!Line: 22 - note: Virtual function in base class
!Line: 61 - note: Function in derived class

Hit(int32_t /*dmg*/) override
{
}
private:
void

!Line: 61 - style: The function 'Hit' overrides a function in a base class but is identical to the overridden function [uselessOverride]
!Line: 22 - note: Virtual function in base class
!Line: 61 - note: Function in derived class

Hit(int32_t /*dmg*/) override
{
}
private:
void

!Line: 61 - style: The function 'Hit' overrides a function in a base class but is identical to the overridden function [uselessOverride]
!Line: 22 - note: Virtual function in base class
!Line: 61 - note: Function in derived class

Hit(int32_t /*dmg*/) override
{
}
private:
void

!Line: 61 - style: The function 'Hit' overrides a function in a base class but is identical to the overridden function [uselessOverride]
!Line: 22 - note: Virtual function in base class
!Line: 61 - note: Function in derived class

Hit(int32_t /*dmg*/) override
{
}
private:
void

!Line: 61 - style: The function 'Hit' overrides a function in a base class but is identical to the overridden function [uselessOverride]
!Line: 22 - note: Virtual function in base class
!Line: 61 - note: Function in derived class

InputManager::InternalKeyCallback(GLFWwindow* window, int32_t key, int32_t scancode,
int32_t action, int32_t mods)
{
Logger::Trace("GLFW key {} {} scan code - {}", action, key, scancode);
keyMap_[key] = action;

!Line: 28 - style: Parameter 'window' can be declared as pointer to const. However it seems that 'InternalKeyCallback' is a callback function, if 'window' is declared with const you might also need to cast function pointer(s). [constParameterCallback]
!Line: 96 - note: You might need to cast the function pointer here
!Line: 28 - note: Parameter 'window' can be declared as pointer to const

InputManager::InternalCharCallback(GLFWwindow* window, uint32_t key)
{
Logger::Trace("GLFW char {}", key);
auto event = CharEvent{key};

!Line: 40 - style: Parameter 'window' can be declared as pointer to const. However it seems that 'InternalCharCallback' is a callback function, if 'window' is declared with const you might also need to cast function pointer(s). [constParameterCallback]
!Line: 97 - note: You might need to cast the function pointer here
!Line: 40 - note: Parameter 'window' can be declared as pointer to const

InputManager::InternalMouseButtonCallback(GLFWwindow* window, int32_t button, int32_t action,
int32_t mods)
{
Logger::Trace("GLFW mouse button {} {} {}", button, action, mods);
mouseButtonMap_[button] = action;

!Line: 50 - style: Parameter 'window' can be declared as pointer to const. However it seems that 'InternalMouseButtonCallback' is a callback function, if 'window' is declared with const you might also need to cast function pointer(s). [constParameterCallback]
!Line: 98 - note: You might need to cast the function pointer here
!Line: 50 - note: Parameter 'window' can be declared as pointer to const

InputManager::InternalCursorPositionCallback(GLFWwindow* window, double xPos, double yPos)
{
Logger::Trace("GLFW cursor pos {} {}", xPos, yPos);
mousePosition_ = glm::vec2(xPos, yPos);
auto event = CursorPositionEvent{xPos, yPos};

!Line: 61 - style: Parameter 'window' can be declared as pointer to const. However it seems that 'InternalCursorPositionCallback' is a callback function, if 'window' is declared with const you might also need to cast function pointer(s). [constParameterCallback]
!Line: 99 - note: You might need to cast the function pointer here
!Line: 61 - note: Parameter 'window' can be declared as pointer to const

InputManager::InternalMouseScrollCallback(GLFWwindow* window, double xOffset, double yOffset)
{
Logger::Trace("GLFW scroll {} {}", xOffset, yOffset);
auto event = MouseScrollEvent{xOffset, yOffset};

!Line: 72 - style: Parameter 'window' can be declared as pointer to const. However it seems that 'InternalMouseScrollCallback' is a callback function, if 'window' is declared with const you might also need to cast function pointer(s). [constParameterCallback]
!Line: 100 - note: You might need to cast the function pointer here
!Line: 72 - note: Parameter 'window' can be declared as pointer to const

InputManager::InternalWindowFocusCallback(GLFWwindow* window, int32_t focused)
{
Logger::Trace("GLFW window focus {}", focused);
auto event = WindowFocusEvent{focused};

!Line: 82 - style: Parameter 'window' can be declared as pointer to const. However it seems that 'InternalWindowFocusCallback' is a callback function, if 'window' is declared with const you might also need to cast function pointer(s). [constParameterCallback]
!Line: 101 - note: You might need to cast the function pointer here
!Line: 82 - note: Parameter 'window' can be declared as pointer to const

Buffer::CopyDataWithStaging(void* data, size_t dataSize) const
{
VkBuffer stagingBuffer = {};
VkDeviceMemory stagingBufferMemory = {};
Buffer::CreateBuffer(dataSize, VK_BUFFER_USAGE_TRANSFER_SRC_BIT,
VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT,

!Line: 57 - style: Parameter 'data' can be declared as pointer to const [constParameterPointer]

Buffer::CopyDataToImageWithStaging(VkImage image, void* data, size_t dataSize,
const std::vector< VkBufferImageCopy >& copyRegions)
{
VkBuffer stagingBuffer = {};
VkDeviceMemory stagingBufferMemory = {};
Buffer::CreateBuffer(dataSize, VK_BUFFER_USAGE_TRANSFER_SRC_BIT,

!Line: 74 - style: Parameter 'data' can be declared as pointer to const [constParameterPointer]

Hit(int32_t /*dmg*/) override
{
}
private:
void

!Line: 61 - style: The function 'Hit' overrides a function in a base class but is identical to the overridden function [uselessOverride]
!Line: 22 - note: Virtual function in base class
!Line: 61 - note: Function in derived class

Hit(int32_t /*dmg*/) override
{
}
private:
void

!Line: 61 - style: The function 'Hit' overrides a function in a base class but is identical to the overridden function [uselessOverride]
!Line: 22 - note: Virtual function in base class
!Line: 61 - note: Function in derived class

TransitionImageLayout(VkImageLayout oldLayout, VkImageLayout newLayout, uint32_t mipLevels);
void
CopyBufferToImage(uint8_t* data);
private:

!Line: 78 - style: inconclusive: Technically the member function 'looper::renderer::Texture::TransitionImageLayout' can be const. [functionConst]
!Line: 434 - note: Technically the member function 'looper::renderer::Texture::TransitionImageLayout' can be const.
!Line: 78 - note: Technically the member function 'looper::renderer::Texture::TransitionImageLayout' can be const.

CopyBufferToImage(uint8_t* data);
private:
TextureID id_ = {};
TextureType m_type = {};
VkImage m_textureImage = {};

!Line: 81 - style: inconclusive: Technically the member function 'looper::renderer::Texture::CopyBufferToImage' can be const. [functionConst]
!Line: 378 - note: Technically the member function 'looper::renderer::Texture::CopyBufferToImage' can be const.
!Line: 81 - note: Technically the member function 'looper::renderer::Texture::CopyBufferToImage' can be const.

Hit(int32_t /*dmg*/) override
{
}
private:
void

!Line: 61 - style: The function 'Hit' overrides a function in a base class but is identical to the overridden function [uselessOverride]
!Line: 22 - note: Virtual function in base class
!Line: 61 - note: Function in derived class

Hit(int32_t /*dmg*/) override
{
}
private:
void

!Line: 61 - style: The function 'Hit' overrides a function in a base class but is identical to the overridden function [uselessOverride]
!Line: 22 - note: Virtual function in base class
!Line: 61 - note: Function in derived class

🔴 clang-tidy found 4 issues! Click here to see details.

CreateShaderModule(VkDevice device, std::vector< char >&& shaderByteCode)
{
VkShaderModuleCreateInfo createInfo = {};
createInfo.sType = VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO;
createInfo.codeSize = shaderByteCode.size();
// NOLINTNEXTLINE

!Line: 14 - error: function 'CreateShaderModule' declared 'static', move to anonymous namespace instead [misc-use-anonymous-namespace,-warnings-as-errors]

queue_.push_back({prec, work});
}
void
WorkQueue::RunWorkUnits()
{

!Line: 11 - error: use emplace_back instead of push_back [hicpp-use-emplace,modernize-use-emplace,-warnings-as-errors]

do
{
updateTime -= animationDurationMs;
animationValue +=
currentState_.m_currentAnimationEnd - currentState_.m_currentAnimationBegin;

!Line: 90 - error: avoid do-while loops [cppcoreguidelines-avoid-do-while,-warnings-as-errors]

TypeToString(ObjectType type)
{
std::string typeStr;
switch (type)
{

!Line: 6 - error: function 'TypeToString' declared 'static', move to anonymous namespace instead [misc-use-anonymous-namespace,-warnings-as-errors]


@JacobDomagala JacobDomagala force-pushed the 148-resolve-issue-with-ubuntu-docker-build branch 4 times, most recently from 9e7ac1d to 05b9943 Compare October 27, 2023 09:16
@JacobDomagala JacobDomagala force-pushed the 148-resolve-issue-with-ubuntu-docker-build branch from 05b9943 to 39bc879 Compare October 27, 2023 09:20
@JacobDomagala JacobDomagala changed the title [#148]: Set clang-14 as env variable for ubuntu docker build [#148]: Fix issues with Ubuntu docker build Oct 27, 2023
@JacobDomagala JacobDomagala merged commit aa1c37b into master Oct 27, 2023
2 of 3 checks passed
@JacobDomagala JacobDomagala deleted the 148-resolve-issue-with-ubuntu-docker-build branch October 27, 2023 09:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Resolve issue with Ubuntu docker build
1 participant