Skip to content

Sonar cleanup 7 - #8744

Merged
sithlord48 merged 21 commits into
masterfrom
sonarCleanup_7
Jul 11, 2025
Merged

Sonar cleanup 7#8744
sithlord48 merged 21 commits into
masterfrom
sonarCleanup_7

Conversation

@sithlord48

@sithlord48 sithlord48 commented Jul 7, 2025

Copy link
Copy Markdown
Member

Next Round of sonar cleanup

  • Use std::ignore instead of unused int
  • replace throw() with noexcept in some cases (no exception possible)
  • Remove enums and replace with static items
    • LogOutputters::EFileLogOutputter, use constexpr instead s_logFileSizeLimit
    • Anonymous enum in Common.h => set of s_exit<Status> vars
    • Anonymous enum in IKeyState => s_numButtons
    • Anonymous enum in EiEventQueue = > set of s_ vars local to the method they are used in
    • Anonymous enum in XWindowsKeyState = > set of s_ vars
    • Remove unused Anonymous enum in SecureSocket
    • ActionDialog::ActionTypes is now a struct of values.
  • More enum classes
    • anonymous enum in Event.h => EventFlags enum class.
    • ELevel => LogLevel enum class
    • IEventQueueBuffer::Type now enum class.
    • ServerProxy::EResult => ServerProxy::ConnectionResult enum class
    • ArgsBase::Type => ArgsBase::ClassType enum class
    • make ClientApp::ClientScrollDirection an enum class, use Normal and Inverted for member names.
    • TCPSocket::EJobResult => TCPSocket::JobResult enum class
    • XSocket::EError => XSocket:SocketError enum class
    • anonymous enum in AddClientDialog => AddClientDialog::AddAction enum class.
    • anonymous enum in ServerConfig => ServerConfig::AddResults enum class.

@sithlord48
sithlord48 force-pushed the sonarCleanup_7 branch 15 times, most recently from 2d5cac0 to baff73e Compare July 8, 2025 21:19
@sithlord48
sithlord48 marked this pull request as ready for review July 8, 2025 21:31
@sithlord48
sithlord48 requested a review from nbolton July 8, 2025 21:31
@sithlord48 sithlord48 added this to the v1.23.0 milestone Jul 8, 2025
@sithlord48 sithlord48 added the 🗒️ task Doesn't directly add new functionality or fix bugs in the program label Jul 8, 2025
nbolton
nbolton previously approved these changes Jul 9, 2025

@nbolton nbolton left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only nits.

Comment thread src/lib/base/Log.cpp Outdated
Comment thread src/lib/server/InputFilter.cpp
Comment thread src/lib/server/InputFilter.cpp Outdated
@sithlord48
sithlord48 requested a review from nbolton July 9, 2025 13:20
@sithlord48
sithlord48 enabled auto-merge (rebase) July 10, 2025 12:29
@sithlord48
sithlord48 merged commit 9413393 into master Jul 11, 2025
57 of 58 checks passed
@sithlord48
sithlord48 deleted the sonarCleanup_7 branch July 11, 2025 10:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🗒️ task Doesn't directly add new functionality or fix bugs in the program

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants