From e522d98befc2f5b3dea1d3bdcfb05ac1d7314914 Mon Sep 17 00:00:00 2001 From: Hans-Joerg Schurr Date: Fri, 21 Feb 2020 18:50:27 +0100 Subject: [PATCH] Add configuration files for dev environment - clang-format options that I like - cquery config that worked in another project - some .gitignore - a shell.nix file --- .clang-format | 41 +++++++++++++++++++++++++++++++++++++++++ .cquery | 5 +++++ .gitignore | 14 ++++++++++++++ shell.nix | 20 ++++++++++++++++++++ 4 files changed, 80 insertions(+) create mode 100644 .clang-format create mode 100644 .cquery create mode 100644 .gitignore create mode 100644 shell.nix diff --git a/.clang-format b/.clang-format new file mode 100644 index 0000000..430fb88 --- /dev/null +++ b/.clang-format @@ -0,0 +1,41 @@ +--- +BasedOnStyle: Mozilla +AlignAfterOpenBracket: AlwaysBreak +AlignConsecutiveAssignments: 'false' +AlignConsecutiveDeclarations: 'false' +AlignEscapedNewlines: DontAlign +AlignOperands: 'false' +AlignTrailingComments: 'false' +AllowAllParametersOfDeclarationOnNextLine: 'true' +AllowShortBlocksOnASingleLine: 'true' +AllowShortCaseLabelsOnASingleLine: 'true' +AllowShortFunctionsOnASingleLine: All +AllowShortIfStatementsOnASingleLine: 'true' +AllowShortLoopsOnASingleLine: 'true' +AlwaysBreakAfterReturnType: None +AlwaysBreakBeforeMultilineStrings: 'true' +BinPackArguments: 'true' +BinPackParameters: 'true' +BreakBeforeBraces: Mozilla +BreakBeforeTernaryOperators: 'true' +BreakStringLiterals: 'false' +DerivePointerAlignment: 'false' +IncludeBlocks: Regroup +IndentCaseLabels: 'true' +IndentPPDirectives: None +IndentWidth: '2' +IndentWrappedFunctionNames: 'false' +KeepEmptyLinesAtTheStartOfBlocks: 'false' +Language: Cpp +PointerAlignment: Left +ReflowComments: 'false' +SpaceAfterCStyleCast: 'false' +SpaceBeforeAssignmentOperators: 'true' +SpaceInEmptyParentheses: 'false' +SpacesInCStyleCastParentheses: 'false' +SpacesInParentheses: 'false' +SpacesInSquareBrackets: 'false' +TabWidth: '2' +UseTab: ForContinuationAndIndentation + +... diff --git a/.cquery b/.cquery new file mode 100644 index 0000000..b841bc7 --- /dev/null +++ b/.cquery @@ -0,0 +1,5 @@ +%clang +%c -std=gnu99 + +-I./src +-I. diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..02f3776 --- /dev/null +++ b/.gitignore @@ -0,0 +1,14 @@ +*.o +*.gcov +*.gcno +*.gcda + +*.tar.gz +*.tgz +*.gz +*.zip + +*.png +*.ps +*.pdf + diff --git a/shell.nix b/shell.nix new file mode 100644 index 0000000..fc22ae7 --- /dev/null +++ b/shell.nix @@ -0,0 +1,20 @@ +/* + * This file is a nix expression which can be used to get an isolated + * development environemt. + * + * When the nix package manager is installed run + * > nix-shell ./scripts/dev-env.nix + * to get a shell with the dependenies of veriT present. This was only tested + * on NixOS, but should work on other platforms which are supported by the Nix + * packagemanger (such as MacOS X) too. + */ + +{ pkgs ? import {} }: + +pkgs.stdenv.mkDerivation { + name = "hvif-light"; + + hardeningDisable = [ "all" ]; + buildInputs = with pkgs; [ autoconf automake gcc clang-tools ]; + +}