mirror of
https://github.com/LizardByte/Sunshine.git
synced 2026-07-16 16:47:12 +02:00
chore(sonar): change NOSONAR comment style (#5410)
CodeQL / CodeQL (push) Has been cancelled
CI / Archlinux (push) Has been cancelled
CI / Linux (push) Has been cancelled
CI / GitHub Env Debug (push) Has been cancelled
CI / Release Setup (push) Has been cancelled
CI / Docker (push) Has been cancelled
CI / FreeBSD (push) Has been cancelled
CI / Homebrew (push) Has been cancelled
CI / macOS (push) Has been cancelled
CI / Linux Copr (push) Has been cancelled
CI / Linux Flatpak (push) Has been cancelled
CI / Windows (push) Has been cancelled
CI / Bundle Analysis (push) Has been cancelled
CI / Coverage-Archlinux (push) Has been cancelled
CI / Coverage-FreeBSD-aarch64 (push) Has been cancelled
CI / Coverage-FreeBSD-amd64 (push) Has been cancelled
CI / Coverage-Homebrew-ubuntu-24.04 (push) Has been cancelled
CI / Coverage-Linux-AppImage (push) Has been cancelled
CI / Coverage-Windows-AMD64 (push) Has been cancelled
CI / Coverage-Windows-ARM64 (push) Has been cancelled
CI / Coverage-Homebrew-macos-14 (push) Has been cancelled
CI / Coverage-Homebrew-macos-15 (push) Has been cancelled
CI / Coverage-Homebrew-macos-26 (push) Has been cancelled
CI / Coverage-macOS-arm64 (push) Has been cancelled
CI / Coverage-macOS-x86_64 (push) Has been cancelled
CI / Release (push) Has been cancelled
CI / Release Homebrew Beta (push) Has been cancelled
Build GH-Pages / prep (push) Has been cancelled
Build GH-Pages / call-jekyll-build (push) Has been cancelled
localize / Update Localization (push) Has been cancelled
CodeQL / CodeQL (push) Has been cancelled
CI / Archlinux (push) Has been cancelled
CI / Linux (push) Has been cancelled
CI / GitHub Env Debug (push) Has been cancelled
CI / Release Setup (push) Has been cancelled
CI / Docker (push) Has been cancelled
CI / FreeBSD (push) Has been cancelled
CI / Homebrew (push) Has been cancelled
CI / macOS (push) Has been cancelled
CI / Linux Copr (push) Has been cancelled
CI / Linux Flatpak (push) Has been cancelled
CI / Windows (push) Has been cancelled
CI / Bundle Analysis (push) Has been cancelled
CI / Coverage-Archlinux (push) Has been cancelled
CI / Coverage-FreeBSD-aarch64 (push) Has been cancelled
CI / Coverage-FreeBSD-amd64 (push) Has been cancelled
CI / Coverage-Homebrew-ubuntu-24.04 (push) Has been cancelled
CI / Coverage-Linux-AppImage (push) Has been cancelled
CI / Coverage-Windows-AMD64 (push) Has been cancelled
CI / Coverage-Windows-ARM64 (push) Has been cancelled
CI / Coverage-Homebrew-macos-14 (push) Has been cancelled
CI / Coverage-Homebrew-macos-15 (push) Has been cancelled
CI / Coverage-Homebrew-macos-26 (push) Has been cancelled
CI / Coverage-macOS-arm64 (push) Has been cancelled
CI / Coverage-macOS-x86_64 (push) Has been cancelled
CI / Release (push) Has been cancelled
CI / Release Homebrew Beta (push) Has been cancelled
Build GH-Pages / prep (push) Has been cancelled
Build GH-Pages / call-jekyll-build (push) Has been cancelled
localize / Update Localization (push) Has been cancelled
This commit is contained in:
+1
-1
@@ -1004,7 +1004,7 @@ namespace config {
|
||||
* @param name Setting name.
|
||||
* @param output Parsed string list.
|
||||
*/
|
||||
void string_list_f(std::unordered_map<std::string, std::string> &vars, const std::string &name, std::vector<std::string> &output) { // NOSONAR(cpp:S6045) - transparent hasher not available for unordered_map in this codebase
|
||||
void string_list_f(std::unordered_map<std::string, std::string> &vars, const std::string &name, std::vector<std::string> &output) { // NOSONAR(cpp:S6045): transparent hasher not available for unordered_map in this codebase
|
||||
std::string temp;
|
||||
string_f(vars, name, temp);
|
||||
|
||||
|
||||
+2
-3
@@ -207,8 +207,7 @@ namespace http {
|
||||
* @brief Send a static file response for a Web UI request.
|
||||
*/
|
||||
bool download_file(const std::string &url, const std::string &file, long ssl_version) {
|
||||
// sonar complains about weak ssl and tls versions; however sonar cannot detect the fix
|
||||
CURL *curl = curl_easy_init(); // NOSONAR
|
||||
CURL *curl = curl_easy_init();
|
||||
if (!curl) {
|
||||
BOOST_LOG(error) << "Couldn't create CURL instance";
|
||||
return false;
|
||||
@@ -227,7 +226,7 @@ namespace http {
|
||||
return false;
|
||||
}
|
||||
|
||||
curl_easy_setopt(curl, CURLOPT_SSLVERSION, ssl_version); // NOSONAR
|
||||
curl_easy_setopt(curl, CURLOPT_SSLVERSION, ssl_version);
|
||||
curl_easy_setopt(curl, CURLOPT_URL, url.c_str());
|
||||
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, fwrite);
|
||||
curl_easy_setopt(curl, CURLOPT_WRITEDATA, fp);
|
||||
|
||||
+1
-1
@@ -175,7 +175,7 @@ namespace nvhttp {
|
||||
std::atomic<uint32_t> session_id_counter; ///< Monotonic counter used to allocate GameStream session IDs.
|
||||
|
||||
// Set by TLS verify callback, read by launch/resume handler (single-threaded HTTPS server)
|
||||
std::string last_verified_client_cert; ///< Last client certificate accepted by the TLS verify callback. // NOSONAR(cpp:S5421) - intentionally mutable global
|
||||
std::string last_verified_client_cert; ///< Last client certificate accepted by the TLS verify callback. // NOSONAR(cpp:S5421): intentionally mutable global
|
||||
|
||||
/**
|
||||
* @brief Case-insensitive map used for HTTP headers and query parameters.
|
||||
|
||||
@@ -749,7 +749,7 @@ namespace va {
|
||||
std::unique_ptr<platf::avcodec_encode_device_t> make_avcodec_encode_device(int width, int height, int offset_x, int offset_y, bool vram) {
|
||||
auto render_device = platf::resolve_render_device();
|
||||
|
||||
file_t file = ::open(render_device.c_str(), O_RDWR); // NOSONAR(cpp:S1874) - `_sopen_s` not available
|
||||
file_t file = ::open(render_device.c_str(), O_RDWR); // NOSONAR(cpp:S1874): `_sopen_s` not available
|
||||
if (file.el < 0) {
|
||||
char string[1024];
|
||||
BOOST_LOG(error) << "Couldn't open "sv << render_device << ": " << strerror_r(errno, string, sizeof(string));
|
||||
|
||||
@@ -89,7 +89,7 @@ X4wnh1bwdiidqpcgyuKossLOPxbS786WmsesaAWPnpoY6M8aija+ALwNNuWWmyMg
|
||||
*
|
||||
* This fixture creates a real server to test the actual confighttp functions.
|
||||
*/
|
||||
class ConfigHttpTest: public BaseTest { // NOSONAR(cpp:S3656) - protected members are intentional for test fixture subclassing
|
||||
class ConfigHttpTest: public BaseTest { // NOSONAR(cpp:S3656): protected members are intentional for test fixture subclassing
|
||||
protected:
|
||||
std::unique_ptr<SimpleWeb::Server<SimpleWeb::HTTPS>> server;
|
||||
std::unique_ptr<SimpleWeb::Client<SimpleWeb::HTTPS>> client;
|
||||
@@ -132,7 +132,7 @@ protected:
|
||||
};
|
||||
|
||||
// Create test web directory in temp
|
||||
test_web_dir = std::filesystem::temp_directory_path() / "sunshine_test_confighttp"; // NOSONAR(cpp:S5443) - safe for tests
|
||||
test_web_dir = std::filesystem::temp_directory_path() / "sunshine_test_confighttp"; // NOSONAR(cpp:S5443): safe for tests
|
||||
std::filesystem::create_directories(test_web_dir / "web");
|
||||
|
||||
// Create test HTML file in WEB_DIR, creating parent directories with proper permissions
|
||||
@@ -753,14 +753,14 @@ TEST_F(ConfigHttpTest, GetLocaleReturnsJson) {
|
||||
* ├── file_beta.txt
|
||||
* └── test_exec[.exe] (executable file)
|
||||
*/
|
||||
class BrowseDirectoryTest: public ConfigHttpTest { // NOSONAR(cpp:S3656) - protected members are intentional for test fixture subclassing
|
||||
class BrowseDirectoryTest: public ConfigHttpTest { // NOSONAR(cpp:S3656): protected members are intentional for test fixture subclassing
|
||||
protected:
|
||||
std::filesystem::path browse_test_dir;
|
||||
|
||||
void SetUp() override {
|
||||
ConfigHttpTest::SetUp();
|
||||
|
||||
browse_test_dir = std::filesystem::temp_directory_path() / "sunshine_browse_test"; // NOSONAR(cpp:S5443) - safe for tests
|
||||
browse_test_dir = std::filesystem::temp_directory_path() / "sunshine_browse_test"; // NOSONAR(cpp:S5443): safe for tests
|
||||
|
||||
// Remove any leftover directory from a previous interrupted run
|
||||
if (std::filesystem::exists(browse_test_dir)) {
|
||||
|
||||
@@ -19,7 +19,7 @@ protected:
|
||||
void SetUp() override {
|
||||
BaseTest::SetUp();
|
||||
// Create test directory
|
||||
test_dir = fs::temp_directory_path() / "sunshine_process_png_test"; // NOSONAR(cpp:S5443) - safe for tests
|
||||
test_dir = fs::temp_directory_path() / "sunshine_process_png_test"; // NOSONAR(cpp:S5443): safe for tests
|
||||
fs::create_directories(test_dir);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user