1
0

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
This commit is contained in:
Hans-Joerg Schurr 2020-02-21 18:50:27 +01:00
commit e522d98bef
4 changed files with 80 additions and 0 deletions

41
.clang-format Normal file
View File

@ -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
...

5
.cquery Normal file
View File

@ -0,0 +1,5 @@
%clang
%c -std=gnu99
-I./src
-I.

14
.gitignore vendored Normal file
View File

@ -0,0 +1,14 @@
*.o
*.gcov
*.gcno
*.gcda
*.tar.gz
*.tgz
*.gz
*.zip
*.png
*.ps
*.pdf

20
shell.nix Normal file
View File

@ -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 <nixpkgs> {} }:
pkgs.stdenv.mkDerivation {
name = "hvif-light";
hardeningDisable = [ "all" ];
buildInputs = with pkgs; [ autoconf automake gcc clang-tools ];
}