Merge pull request #104 from ethereum/clang-format

CI: Check code format
This commit is contained in:
Alex Beregszaszi 2018-08-28 17:17:10 +01:00 committed by GitHub
commit d1cea93f82
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 20 additions and 7 deletions

View File

@ -1,6 +1,17 @@
version: 2
jobs:
lint:
docker:
- image: ethereum/cpp-build-env
steps:
- checkout
- run:
name: "Check code format"
command: |
find examples include lib test -name '*.hpp' -o -name '*.cpp' -o -name '*.h' -o -name '*.c' | xargs clang-format -i
git diff --color --exit-code
build: &build
docker:
- image: ethereum/cpp-build-env
@ -110,6 +121,7 @@ workflows:
version: 2
evmc:
jobs:
- lint
- build
- build-clang-3.8
- bindings-go-1.10

View File

@ -20,7 +20,7 @@
/**
* Returns true if the VM instance has a compatible ABI version.
*/
static inline int evmc_is_abi_compatible(struct evmc_instance *instance)
static inline int evmc_is_abi_compatible(struct evmc_instance* instance)
{
return instance->abi_version == EVMC_ABI_VERSION;
}
@ -28,7 +28,7 @@ static inline int evmc_is_abi_compatible(struct evmc_instance *instance)
/**
* Returns the name of the VM instance.
*/
static inline const char* evmc_vm_name(struct evmc_instance *instance)
static inline const char* evmc_vm_name(struct evmc_instance* instance)
{
return instance->name;
}
@ -36,7 +36,7 @@ static inline const char* evmc_vm_name(struct evmc_instance *instance)
/**
* Returns the version of the VM instance.
*/
static inline const char* evmc_vm_version(struct evmc_instance *instance)
static inline const char* evmc_vm_version(struct evmc_instance* instance)
{
return instance->version;
}

View File

@ -99,7 +99,8 @@ evmc_create_fn evmc_load(const char* filename, enum evmc_loader_error_code* erro
* the DLL is not going to be loaded multiple times, but the function will return new VM instance
* each time.
*/
struct evmc_instance* evmc_load_and_create(const char* filename, enum evmc_loader_error_code* error_code);
struct evmc_instance* evmc_load_and_create(const char* filename,
enum evmc_loader_error_code* error_code);
#if __cplusplus
}

View File

@ -4,6 +4,7 @@
*/
#include <evmc/loader.h>
#include <evmc/evmc.h>
#include <evmc/helpers.h>
@ -127,7 +128,8 @@ exit:
return create_fn;
}
struct evmc_instance* evmc_load_and_create(const char* filename, enum evmc_loader_error_code* error_code)
struct evmc_instance* evmc_load_and_create(const char* filename,
enum evmc_loader_error_code* error_code)
{
evmc_create_fn create_fn = evmc_load(filename, error_code);

View File

@ -5,4 +5,3 @@
#include <evmc/evmc.h>
#include <evmc/utils.h>

View File

@ -5,4 +5,3 @@
#include <evmc/evmc.h>
#include <evmc/utils.h>