mirror of https://github.com/status-im/evmc.git
Merge pull request #104 from ethereum/clang-format
CI: Check code format
This commit is contained in:
commit
d1cea93f82
12
circle.yml
12
circle.yml
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -5,4 +5,3 @@
|
|||
|
||||
#include <evmc/evmc.h>
|
||||
#include <evmc/utils.h>
|
||||
|
||||
|
|
|
@ -5,4 +5,3 @@
|
|||
|
||||
#include <evmc/evmc.h>
|
||||
#include <evmc/utils.h>
|
||||
|
||||
|
|
Loading…
Reference in New Issue