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

Fix astyle errors (clears all remaining styling issues) #8711

Merged
merged 24 commits into from
Nov 16, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
43615ba
CThunkbase: fix coding style
0xc0170 Nov 12, 2018
a4500e8
blockdevice test: fix coding style
0xc0170 Nov 12, 2018
7d7bfd7
blockdevice: fix components coding style
0xc0170 Nov 12, 2018
501bc29
rtc time test: fix coding style
0xc0170 Nov 12, 2018
9a0651c
astyleignore: add nanostack targets folder
0xc0170 Nov 12, 2018
830f746
rtx idle: fix coding style
0xc0170 Nov 12, 2018
fbdbfff
drivers: fix coding style for doxygen
0xc0170 Nov 12, 2018
3d85957
platform: fix coding style
0xc0170 Nov 12, 2018
edef49b
travis: astyle error leads to the pull request error
0xc0170 Nov 12, 2018
53c4277
filehandle test: fix coding style
0xc0170 Nov 12, 2018
ef728d0
tests: fix doxygen style
0xc0170 Nov 12, 2018
e1e20a6
rtos: fix coding style
0xc0170 Nov 12, 2018
3aab381
nanostack mesh: fix coding style
0xc0170 Nov 12, 2018
29a1149
nanostakc cmsis rtos: fix coding style
0xc0170 Nov 12, 2018
eec4e13
nanostack interface: fix coding style
0xc0170 Nov 12, 2018
3f9d1a9
nanostack eventloop: fix coding style
0xc0170 Nov 12, 2018
70b5772
travis: add after_failure for astyle
0xc0170 Nov 12, 2018
d3e51fc
events: fix coding style
0xc0170 Nov 12, 2018
6d6c09b
blockdevice: fix coding style
0xc0170 Nov 12, 2018
cbdd632
travis: echo failure if astyle fails
0xc0170 Nov 12, 2018
a2ae34b
cellular: fix coding style
0xc0170 Nov 15, 2018
f91eed9
cellular: fix onboard cellular coding style
0xc0170 Nov 15, 2018
91e1da1
cellular: fix test coding style
0xc0170 Nov 15, 2018
3f289c2
unittest: fix stubs coding style
0xc0170 Nov 15, 2018
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
1 change: 1 addition & 0 deletions .astyleignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ hal/storage_abstraction
TESTS/mbed_hal/trng/pithy
features/nanostack/coap-service
features/nanostack/sal-stack-nanostack
features/nanostack/targets
rtos/TARGET_CORTEX/rtx5
TESTS/mbed_hal/trng/pithy
targets
Expand Down
5 changes: 3 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,9 @@ matrix:
- git diff --name-only $TRAVIS_BRANCH | grep '.*\.\(h\|c\|hpp\|cpp\)' | fgrep -v -f .astyleignore | xargs -n 100 -I {} bash -c "astyle -n --options=.astylerc \"{}\"" > astyle-files-changed.out;
if [ $(cat astyle-files-changed.out | grep Formatted | wc -l) -ne 0 ]; then
git --no-pager diff;
echo "Please fix style issues as shown above";
echo "";
echo "AStyle check failed, please fix style issues as shown above";
(exit 1);
else
echo "Coding style check OK";
fi
Expand All @@ -155,7 +157,6 @@ matrix:
STATUSM="$STATUSM ($(python -c "print '%+d' % ($CURR-$PREV)") files)"
fi
- bash -c "$STATUS" success "$STATUSM"

- env:
- NAME=events
- EVENTS=events
Expand Down
4 changes: 2 additions & 2 deletions TESTS/mbed_hal/critical_section/critical_section_test.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@

/** \addtogroup hal_critical
* @{
* \defgroup hal_critical_test Tests
* \defgroup hal_critical_test Tests
* Tests definitions of the HAL Critical module.
* @{
* @{
*/

#ifndef MBED_CRITICAL_SECTION_TEST_H
Expand Down
2 changes: 1 addition & 1 deletion TESTS/mbed_hal/qspi/qspi_test.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
* @{
* \defgroup hal_qspi_tests Tests
* QSPI tests of the HAL.
* @{
* @{
*/
#ifndef MBED_QSPI_TEST_H
#define MBED_QSPI_TEST_H
Expand Down
4 changes: 2 additions & 2 deletions TESTS/mbed_hal/rtc_time/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -183,15 +183,15 @@ void test_set_time_twice()
/* Set the time to NEW_TIME and check it */
set_time(NEW_TIME);
current_time = time(NULL);
TEST_ASSERT_EQUAL (true, (current_time == NEW_TIME));
TEST_ASSERT_EQUAL(true, (current_time == NEW_TIME));

/* Wait 2 seconds */
wait_ms(2000);

/* set the time to NEW_TIME again and check it */
set_time(NEW_TIME);
current_time = time(NULL);
TEST_ASSERT_EQUAL (true, (current_time == NEW_TIME));
TEST_ASSERT_EQUAL(true, (current_time == NEW_TIME));
}

Case cases[] = {
Expand Down
2 changes: 1 addition & 1 deletion TESTS/mbed_hal/sleep/sleep_test_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* @{
* @defgroup hal_sleep_test_util Tests
* Tests of the sleep HAL.
* @{
* @{
*/

#ifndef MBED_SLEEP_TEST_UTILS_H
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ class stubInternetSocket : public InternetSocket {
protected:
nsapi_error_t return_value;
public:
stubInternetSocket() {
stubInternetSocket()
{
return_value = 0;
}
virtual nsapi_error_t connect(const SocketAddress &address)
Expand Down
8 changes: 4 additions & 4 deletions UNITTESTS/stubs/AT_CellularContext_stub.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
using namespace mbed;

AT_CellularContext::AT_CellularContext(ATHandler &at, CellularDevice *device, const char *apn) :
AT_CellularBase(at), _ip_stack_type_requested(DEFAULT_STACK), _is_connected(false), _is_blocking(true),
_current_op(OP_INVALID), _device(device), _nw(0), _fh(0)
AT_CellularBase(at), _ip_stack_type_requested(DEFAULT_STACK), _is_connected(false), _is_blocking(true),
_current_op(OP_INVALID), _device(device), _nw(0), _fh(0)
{
_stack = NULL;
_ip_stack_type = DEFAULT_STACK;
Expand Down Expand Up @@ -115,7 +115,7 @@ void AT_CellularContext::set_sim_pin(const char *sim_pin)
}

nsapi_error_t AT_CellularContext::connect(const char *sim_pin, const char *apn, const char *uname,
const char *pwd)
const char *pwd)
{
return NSAPI_ERROR_OK;
}
Expand Down Expand Up @@ -173,7 +173,7 @@ bool AT_CellularContext::set_new_context(int cid)

nsapi_error_t AT_CellularContext::do_activate_context()
{
return NSAPI_ERROR_OK;
return NSAPI_ERROR_OK;
}

void AT_CellularContext::do_connect()
Expand Down
8 changes: 4 additions & 4 deletions UNITTESTS/stubs/CellularDevice_stub.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ MBED_WEAK CellularDevice *CellularDevice::get_default_instance()
return NULL;
}

CellularDevice::CellularDevice(FileHandle *fh) : _network_ref_count(0), _sms_ref_count(0),_power_ref_count(0), _sim_ref_count(0),
_info_ref_count(0), _fh(fh), _queue(5 * EVENTS_EVENT_SIZE), _state_machine(0), _nw(0)
CellularDevice::CellularDevice(FileHandle *fh) : _network_ref_count(0), _sms_ref_count(0), _power_ref_count(0), _sim_ref_count(0),
_info_ref_count(0), _fh(fh), _queue(5 * EVENTS_EVENT_SIZE), _state_machine(0), _nw(0)
{
}

Expand All @@ -41,11 +41,11 @@ events::EventQueue *CellularDevice::get_queue()
return NULL;
}

void CellularDevice::set_plmn(char const*)
void CellularDevice::set_plmn(char const *)
{
}

void CellularDevice::set_sim_pin(char const*)
void CellularDevice::set_sim_pin(char const *)
{
}

Expand Down
2 changes: 1 addition & 1 deletion UNITTESTS/stubs/CellularStateMachine_stub.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
namespace mbed {

CellularStateMachine::CellularStateMachine(CellularDevice &device, events::EventQueue &queue) :
_cellularDevice(device), _queue(queue)
_cellularDevice(device), _queue(queue)
{

}
Expand Down
2 changes: 1 addition & 1 deletion UNITTESTS/stubs/FileHandle_stub.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class FileHandle_stub : public FileHandle {
return 0;
}

virtual int close()
virtual int close()
{
}

Expand Down
3 changes: 2 additions & 1 deletion UNITTESTS/stubs/NetworkStack_stub.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ class NetworkStackstub : public NetworkStack {
std::list<nsapi_error_t> return_values;
nsapi_error_t return_value;

NetworkStackstub() {
NetworkStackstub()
{
return_value = 0;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class FlashIAPBlockDevice : public BlockDevice {
*/
FlashIAPBlockDevice(uint32_t address = MBED_CONF_FLASHIAP_BLOCK_DEVICE_BASE_ADDRESS,
uint32_t size = MBED_CONF_FLASHIAP_BLOCK_DEVICE_SIZE);

virtual ~FlashIAPBlockDevice();

/** Initialize a block device
Expand Down
Loading