Add Clang Formatting
Signed-off-by: Daniel Henry <iamdanhenry@gmail.com>
This commit is contained in:
20
.clang-format
Normal file
20
.clang-format
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
# <project>/.clang-format
|
||||||
|
BasedOnStyle: LLVM
|
||||||
|
IndentWidth: 2
|
||||||
|
TabWidth: 2
|
||||||
|
UseTab: Never
|
||||||
|
|
||||||
|
# Stop collapsing things to one line
|
||||||
|
AllowShortFunctionsOnASingleLine: None # or 'Empty' if you want only {} allowed
|
||||||
|
AllowShortIfStatementsOnASingleLine: false
|
||||||
|
AllowShortLoopsOnASingleLine: false
|
||||||
|
AllowShortCaseLabelsOnASingleLine: false
|
||||||
|
AllowShortBlocksOnASingleLine: false
|
||||||
|
|
||||||
|
SortIncludes: true
|
||||||
|
IncludeBlocks: Merge
|
||||||
|
IncludeCategories:
|
||||||
|
- Regex: '^".*"'
|
||||||
|
Priority: 1
|
||||||
|
- Regex: '^<.*>'
|
||||||
|
Priority: 2
|
||||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,6 +1,5 @@
|
|||||||
.cache
|
.cache
|
||||||
compile_commands.json
|
compile_commands.json
|
||||||
.clang-format
|
|
||||||
|
|
||||||
build/
|
build/
|
||||||
obj/
|
obj/
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
#include <stdio.h>
|
|
||||||
|
|
||||||
#include "chunk.h"
|
#include "chunk.h"
|
||||||
#include "value.h"
|
#include "value.h"
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
void disassembleChunk(Chunk *chunk, const char *name) {
|
void disassembleChunk(Chunk *chunk, const char *name) {
|
||||||
printf("== %s ==\n", name);
|
printf("== %s ==\n", name);
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
#include <stdio.h>
|
|
||||||
|
|
||||||
#include "memory.h"
|
|
||||||
#include "value.h"
|
#include "value.h"
|
||||||
|
#include "memory.h"
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
void initValueArray(ValueArray *array) {
|
void initValueArray(ValueArray *array) {
|
||||||
array->values = NULL;
|
array->values = NULL;
|
||||||
|
|||||||
Reference in New Issue
Block a user