From d53bffffdeb0a691871af3dcf6e6eb00cd7b7577 Mon Sep 17 00:00:00 2001 From: Simon Praetorius <simon.praetorius@tu-dresden.de> Date: Thu, 16 Nov 2017 18:23:05 +0100 Subject: [PATCH] removed contrib directory and corrected the contribution guides --- CONTRIBUTING.md | 20 +++++++++++--------- contrib/ci-setup | 23 ----------------------- 2 files changed, 11 insertions(+), 32 deletions(-) delete mode 100755 contrib/ci-setup diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 53ee4e72..36842ca0 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -13,6 +13,8 @@ This style-guide is intended for developers writing code for AMDiS, is not compl Parts of this convention are taken from well established style guides, like the *Google C++ Style Guide*. +In general, the code should follow the [C++ Core Guidelines](https://github.com/isocpp/CppCoreGuidelines). + ## File naming conventions Filenames should be mixed lower and upper case, starting with an uppercase letter. They should not include underscores or dashed. Use an uppercase letter to indicate a new subword. Sourcefiles should end in `.cpp` and header files should end in `.hpp`. In case you move the code of a template class to a separate file, included textually at the end of the corresponding header file, use the extensions `.inc.hpp`. @@ -26,19 +28,19 @@ Examples of valid filenames: * `DOFVector.cpp` * `DOFVector.inc.hpp` (the implementation of the methods of the template class `DOFVector<T>`) -Do not use filenames that already exist in /usr/include or are stdandard C/C++ include files, such as `math.h` (remember that windows files-systems are case insensitive and thus, there is not difference between `math.h` and `Math.H`.) +Do not use filenames that already exist in /usr/include or are stdandard C/C++ include files, such as `math.h` (remember that windows files-systems are case insensitive and thus, there is no difference between `math.h` and `Math.H`.) ## Generale file structure Every header file should start with a copyright notice and an include guard `#pragma once`, where the text of the copyright notice is given in the file `tools/license.templ.txt` and can automatically by added, using the script files in the `tools` directory: ``` c++ -// Software License for AMDiS2 +// Software License for dune-amdis // -// Copyright (c) 2015 Institute for Scientific Computing, TU-Dresden +// Copyright (c) 2015 Institute for Scientific Computing, Technische Universitaet Dresden // All rights reserved. // Authors: Simon Praetorius // -// This file is part of the AMDiS2 Library +// This file is part of the dune-amdis Library // see also the LICENSE file in the distribution. #pragma once @@ -55,7 +57,7 @@ All of a project's header files should be listed as descendants of the project's * Other external libraries' header files. * Your project's header files. -For better readability a comment above each group can be added. Within each section the includes should be ordered alphabetically. Project's header files should be surrounded by `"`, while external header files hould be surrounded by `<...>`. +For better readability a comment above each group can be added. Within each section the includes should be ordered alphabetically. Project's header files should be surrounded by `"`, while external header files should be surrounded by `<...>`. For example, the includes in `io/VtkWriter.cpp` might look like this: @@ -93,15 +95,15 @@ namespace AMDiS } // end namespace AMDiS ``` -Implementation details are put into a subnamespace `Impl`. +Implementation details are put into a subnamespace `Impl`. A few more subnamespaces of `AMDiS` are allowed, e.g., `Concepts`. If onw of these subnamespaces need another subsubnamespace for implementation details, it should be names `_Impl`. ## Line length -Each line of text in your code should be at most 80 characters long. +Each line of text in your code should be at most 100 characters long. **Exceptions:** -* An #include statement with a long path may exceed 80 columns. -* A raw-string literal may have content that exceeds 80 characters. +* An #include statement with a long path may exceed 100 columns. +* A raw-string literal may have content that exceeds 100 characters. * ... ## Indentation diff --git a/contrib/ci-setup b/contrib/ci-setup deleted file mode 100755 index 0039f76a..00000000 --- a/contrib/ci-setup +++ /dev/null @@ -1,23 +0,0 @@ -#! /bin/bash - -set -e -set -x - -root=${PWD} - -if [ ! -d install/MTL ]; then - mkdir -p install/MTL - cd install/MTL - curl -o MTL.tar.gz "http://www.simunova.com/downloads/mtl4/MTL-4.0.9555-Linux.tar.gz" - tar --strip-components=2 -xf MTL.tar.gz - rm MTL.tar.gz - cd ${root} -fi - -# if [ ! -d install/gtest ]; then -# mkdir -p install/gtest -# cd install/gtest -# cmake -DCMAKE_INSTALL_PREFIX=${root}/install/gtest /usr/src/gtest -# make -# cd ${root} -# fi -- GitLab