Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Docs] Remove rule about matching .c and .h files #861

Merged
merged 1 commit into from
Aug 31, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Documentation/devel/coding-style.rst
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,11 @@ Code formatting

Groups:

#. Matching :file:`.h` header for :file:`.c` files.
#. Standard library headers.
#. Non-standard headers not included in Gramine's repository (e.g. from
external dependencies, like :file:`curl.h`).
#. Gramine's headers.
#. Gramine's headers (including matching :file:`.h` header for :file:`.c`
files).

#. Assignments may be aligned when assigning some structurized data (e.g. struct
members). Example::
Expand Down
3 changes: 1 addition & 2 deletions libos/src/libos_checkpoint.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,11 @@
* This file contains implementation of checkpoint and restore.
*/

#include "libos_checkpoint.h"

#include <asm/mman.h>
#include <stdarg.h>
#include <stdint.h>

#include "libos_checkpoint.h"
#include "libos_internal.h"
#include "libos_ipc.h"
#include "libos_process.h"
Expand Down
3 changes: 1 addition & 2 deletions pal/src/host/linux-sgx/enclave_ecalls.c
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
#include "enclave_ecalls.h"

#include <stdalign.h>

#include "api.h"
#include "enclave_ecalls.h"
#include "pal_ecall_types.h"
#include "pal_linux.h"
#include "pal_rpc_queue.h"
Expand Down
3 changes: 1 addition & 2 deletions pal/src/host/linux-sgx/enclave_ocalls.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
* values and report success instead of injecting -EINTR).
*/

#include "enclave_ocalls.h"

#include <asm/errno.h>
#include <linux/futex.h>
#include <stdalign.h>
Expand All @@ -29,6 +27,7 @@
#include "api.h"
#include "asan.h"
#include "cpu.h"
#include "enclave_ocalls.h"
#include "pal_internal.h"
#include "pal_ocall_types.h"
#include "pal_rpc_queue.h"
Expand Down
3 changes: 1 addition & 2 deletions pal/src/host/linux-sgx/enclave_pages.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include "enclave_pages.h"

#include "api.h"
#include "asan.h"
#include "enclave_pages.h"
#include "list.h"
#include "pal_error.h"
#include "pal_linux.h"
Expand Down
2 changes: 1 addition & 1 deletion pal/src/host/linux-sgx/gdb_integration/sgx_gdb.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#define _GNU_SOURCE
#include "sgx_gdb.h"

#include <errno.h>
#include <fcntl.h>
Expand All @@ -17,6 +16,7 @@
#include <wait.h>

#include "assert.h"
#include "sgx_gdb.h"
#include "../sgx_arch.h"

/* Used by GDB with PTRACE_GETREGSET. */
Expand Down
1 change: 0 additions & 1 deletion pal/src/host/linux-sgx/host_ecalls.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
/* Copyright (C) 2014 Stony Brook University */

#include "host_ecalls.h"

#include "host_internal.h"
#include "pal_ecall_types.h"
#include "pal_rpc_queue.h"
Expand Down