Skip to content

Commit 3bebd6a

Browse files
committed
Initial SonarQube improvements
1 parent 5196104 commit 3bebd6a

File tree

4 files changed

+21
-6
lines changed

4 files changed

+21
-6
lines changed

setup/shell-change-notify-custom-action/dll_main.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// SPDX-License-Identifier: BSD-3-Clause
33

44
#include <Windows.h>
5-
#include <msiquery.h>
5+
#include <MsiQuery.h>
66
#include <ShlObj.h>
77

88
unsigned int __stdcall SHChangeNotifyCustomAction(const MSIHANDLE install)

sonar-project.properties

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# SPDX-FileCopyrightText: © 2025 Team CharLS
2+
# SPDX-License-Identifier: BSD-3-Clause
3+
4+
sonar.projectKey = team-charls_netpbm-wic-codec
5+
sonar.organization = team-charls
6+
7+
# This is the name and version displayed in the SonarCloud UI.
8+
sonar.projectVersion = 1.0
9+
10+
# Define the source code to scan (only scan files that are part of the NetPbm-WIC codec)
11+
sonar.sources = src/
12+
sonar.tests = test/
13+
14+
# Encoding of the source code files. Default is the default system encoding, which is not correct.
15+
sonar.sourceEncoding=UTF-8

src/dll_main.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -167,13 +167,13 @@ void register_property_store()
167167
// ReSharper disable CppInconsistentNaming
168168
// ReSharper disable CppParameterNamesMismatch
169169

170-
BOOL __stdcall DllMain(const HMODULE module, const DWORD reason_for_call, void* /*reserved*/) noexcept
170+
BOOL __stdcall DllMain(const HMODULE dll_module, const DWORD reason_for_call, void* /*reserved*/) noexcept
171171
{
172172
switch (reason_for_call)
173173
{
174174
case DLL_PROCESS_ATTACH:
175175
TRACE("netpbm-wic-codec::DllMain DLL_PROCESS_ATTACH \n");
176-
VERIFY(DisableThreadLibraryCalls(module));
176+
VERIFY(DisableThreadLibraryCalls(dll_module));
177177
break;
178178

179179
case DLL_THREAD_ATTACH:

src/util.ixx

+3-3
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ namespace {
1717

1818
[[nodiscard]] HMODULE get_current_module() noexcept
1919
{
20-
HMODULE module;
20+
HMODULE current_module;
2121
GetModuleHandleExW(GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS | GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT,
22-
reinterpret_cast<PCWSTR>(get_current_module), &module);
22+
reinterpret_cast<PCWSTR>(get_current_module), &current_module);
2323

24-
return module;
24+
return current_module;
2525
}
2626

2727
} // namespace

0 commit comments

Comments
 (0)