diff --git a/include/fsmod/FileSystem.hpp b/include/fsmod/FileSystem.hpp index 6a6081c..78fb2da 100644 --- a/include/fsmod/FileSystem.hpp +++ b/include/fsmod/FileSystem.hpp @@ -23,6 +23,7 @@ namespace simgrid::fsmod { int max_num_open_files_; public: + explicit FileSystem(std::string name, int max_num_open_files) : name_(std::move(name)), max_num_open_files_(max_num_open_files) {}; static std::shared_ptr create(const std::string &name, int max_num_open_files = 1024); void mount_partition(const std::string &mount_point, std::shared_ptr storage, sg_size_t size, @@ -49,8 +50,6 @@ namespace simgrid::fsmod { [[nodiscard]] std::shared_ptr partition_by_name(const std::string& name) const; [[nodiscard]] std::shared_ptr partition_by_name_or_null(const std::string& name) const; - protected: - explicit FileSystem(std::string name, int max_num_open_files) noexcept: name_(std::move(name)), max_num_open_files_(max_num_open_files) {}; private: [[nodiscard]] std::pair, std::string> find_path_at_mount_point(const std::string &full_path) const; diff --git a/sonar-project.properties b/sonar-project.properties deleted file mode 100644 index 5442930..0000000 --- a/sonar-project.properties +++ /dev/null @@ -1,25 +0,0 @@ -# This file is used to scan the project for issues automatically -# Browse the result here: https://sonarcloud.io/organizations/simgrid/projects?sort=-size - -sonar.organization=simgrid -sonar.projectKey=simgrid_file-system-module -sonar.projectName=FSMOD -sonar.projectVersion=0.1 - -sonar.links.scm=https://github.com/simgrid/file-system-module/ -# Comma-separated paths to directories with sources (required) -sonar.sources=src,examples,include,test - -# Replace alternative operator "not" with "!" -# I like it better, so please leave me alone -sonar.issue.ignore.multicriteria.c5a.ruleKey=cpp:S3659 -sonar.issue.ignore.multicriteria.c5a.resourceKey=**/*.cpp -sonar.issue.ignore.multicriteria.c5b.ruleKey=cpp:S3659 -sonar.issue.ignore.multicriteria.c5b.resourceKey=**/*.hpp - -# Exclude our tests from the duplication detection. -# tests are expected to be somehow repetitive -sonar.cpd.exclusions=test/** - -# Encoding of the source files -sonar.sourceEncoding=UTF-8 diff --git a/src/FileSystem.cpp b/src/FileSystem.cpp index 82d5d5e..c576984 100644 --- a/src/FileSystem.cpp +++ b/src/FileSystem.cpp @@ -39,7 +39,7 @@ namespace simgrid::fsmod { /*********************** PUBLIC INTERFACE *****************************/ std::shared_ptr FileSystem::create(const std::string &name, int max_num_open_files) { - return std::make_shared(FileSystem(name, max_num_open_files)); + return std::make_shared(name, max_num_open_files); } /**