Skip to content

Commit

Permalink
Merge branch 'release/v1.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
panzergame committed Oct 30, 2021
2 parents 9539302 + d9ffb87 commit a457ba4
Show file tree
Hide file tree
Showing 152 changed files with 1,115 additions and 771 deletions.
17 changes: 0 additions & 17 deletions .github/workflows/build.yml

This file was deleted.

7 changes: 3 additions & 4 deletions .github/workflows/sonarcloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,12 @@ jobs:
run: |
wget http://sonarcloud.io/static/cpp/build-wrapper-linux-x86.zip
unzip build-wrapper-linux-x86.zip
- name: Build
run: ci/buildsonarcloud.sh
- name: SonarCloud Scan
- name: Install sonar scanner
run: |
wget https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-4.6.2.2472-linux.zip
unzip sonar-scanner-cli-4.6.2.2472-linux.zip
sonar-scanner-4.6.2.2472-linux/bin/sonar-scanner -Dsonar.host.url=https://sonarcloud.io
- name: Build and scan
run: ci/buildsonarcloud.sh
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
Expand Down
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ set(INCLUDE_DIRS
set(LINK_LIBRARIES
resource
view
view-settings
view-dialogs
view-dialogs-settings
view-task
view-view2d
model
Expand Down
13 changes: 11 additions & 2 deletions ci/buildsonarcloud.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,20 @@ pushd "$BUILD_DIR"

# configure build files with CMake
# we need to explicitly set the install prefix, as CMake's default is /usr/local for some reason...
cmake "$REPO_ROOT" -DCMAKE_INSTALL_PREFIX=/usr
cmake "$REPO_ROOT" -DCMAKE_BUILD_TYPE=Debug -DENABLE_COVERAGE=ON

# Wraps the compilation with the Build Wrapper to generate configuration (used
# later by the SonarQube Scanner) into the "bw-output" folder
"$REPO_ROOT"/build-wrapper-linux-x86/build-wrapper-linux-x86-64 \
--out-dir $"$REPO_ROOT"/bw-output cmake \
--out-dir bw-output cmake \
--build .
# Test project
ctest -VV

# Generate coverage report
make gcov

# Scan project
"$REPO_ROOT"/sonar-scanner-4.6.2.2472-linux/bin/sonar-scanner -Dsonar.host.url=https://sonarcloud.io -Dproject.settings="$REPO_ROOT"/sonar-project.properties -Dsonar.projectBaseDir="$REPO_ROOT" -Dsonar.cfamily.gcov.reportsPath="$BUILD_DIR"


47 changes: 0 additions & 47 deletions ci/buildtestcoverage.sh

This file was deleted.

2 changes: 0 additions & 2 deletions codecov.yml

This file was deleted.

2 changes: 1 addition & 1 deletion src/config/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

#include <fstream>

namespace Config
namespace config
{

Config::Config(const std::string &filePath)
Expand Down
12 changes: 6 additions & 6 deletions src/config/config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
#include <config/list.h>
#include <config/property.h>

namespace Config
namespace config
{

namespace Internal
namespace internal
{

{% for node in nodes %}{% if node.__class__ == Group %}
Expand Down Expand Up @@ -77,19 +77,19 @@ public:
}

{% for child in root.children %}
using {{ child.class_name }} = Internal::{{ child.unique_class_name }};
using {{ child.class_name }} = internal::{{ child.unique_class_name }};
{% endfor %}

using Root = Internal::{{ root.unique_class_name }};
using Root = internal::{{ root.unique_class_name }};

using NodeVariant = std::variant<
{% for node in nodes %}{% if node.__class__ != Property %}
Internal::{{ node.unique_class_name }}{{ ", " if not loop.last }}{% endif %}{% endfor %}
internal::{{ node.unique_class_name }}{{ ", " if not loop.last }}{% endif %}{% endfor %}
>;

using NodePtrVariant = std::variant<
{% for node in nodes %}{% if node.__class__ != Property %}
Internal::{{ node.unique_class_name }}*{{ ", " if not loop.last }}{% endif %}{% endfor %}
internal::{{ node.unique_class_name }}*{{ ", " if not loop.last }}{% endif %}{% endfor %}
>;

class Config
Expand Down
2 changes: 1 addition & 1 deletion src/config/group.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

#include <config/node.h>

namespace Config
namespace config
{

/** @brief A configuration group.
Expand Down
2 changes: 1 addition & 1 deletion src/config/list.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

#include <config/node.h>

namespace Config
namespace config
{

/** @brief A configuration node list.
Expand Down
2 changes: 1 addition & 1 deletion src/config/node.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include <node.h>
#include <algorithm>

namespace Config
namespace config
{

Node::Node(const std::string &name, const std::string &description)
Expand Down
2 changes: 1 addition & 1 deletion src/config/node.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

#include <yaml-cpp/yaml.h>

namespace Config
namespace config
{

class Node
Expand Down
2 changes: 1 addition & 1 deletion src/config/property.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#include <config/node.h>

namespace Config
namespace config
{

template <class ValueType>
Expand Down
6 changes: 3 additions & 3 deletions src/exporter/dxfplot/bulge.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@

#include <geometry/bulge.h>

namespace Exporter::Dxfplot
namespace exporter::dxfplot
{

template<>
struct Access<Geometry::Bulge>
struct Access<geometry::Bulge>
{
template <class Archive>
void save(Archive &archive, const Geometry::Bulge &bulge) const
void save(Archive &archive, const geometry::Bulge &bulge) const
{
archive(cereal::make_nvp("start", bulge.start()));
archive(cereal::make_nvp("end", bulge.end()));
Expand Down
6 changes: 3 additions & 3 deletions src/exporter/dxfplot/exporter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@

#include <cereal/cereal.hpp>

namespace Exporter::Dxfplot
namespace exporter::dxfplot
{

void Exporter::operator()(const Model::Document& document, std::ostream &output) const
void Exporter::operator()(const model::Document& document, std::ostream &output) const
{
Archive archive(output);
save(archive, document);
}

void Exporter::save(Archive &archive, const Model::Document& document) const
void Exporter::save(Archive &archive, const model::Document& document) const
{
archive(cereal::make_nvp("task", document.task()));
archive(cereal::make_nvp("profile_name", document.profileConfig().name()));
Expand Down
6 changes: 3 additions & 3 deletions src/exporter/dxfplot/exporter.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,20 @@

#include <fstream>

namespace Exporter::Dxfplot
namespace exporter::dxfplot
{

class Exporter
{
public:
explicit Exporter() = default;

void operator()(const Model::Document& document, std::ostream &output) const;
void operator()(const model::Document& document, std::ostream &output) const;

private:
using Archive = cereal::JSONOutputArchive;

void save(Archive &archive, const Model::Document& document) const;
void save(Archive &archive, const model::Document& document) const;
};

}
Expand Down
Loading

0 comments on commit a457ba4

Please sign in to comment.