Skip to content

cellular: astyle fix #7621

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

Merged
merged 2 commits into from
Aug 1, 2018
Merged

cellular: astyle fix #7621

merged 2 commits into from
Aug 1, 2018

Conversation

0xc0170
Copy link
Contributor

@0xc0170 0xc0170 commented Jul 27, 2018

Description

Running astyle for cellular feature. I run it on all files in the folder. If there are any that should be excludeed, let me know, and I'll add it to the astyle ignore file.

Pull request type

[X] Fix
[ ] Refactor
[ ] New target
[ ] Feature
[ ] Breaking change

@0xc0170 0xc0170 requested a review from a team July 27, 2018 12:35
@0xc0170 0xc0170 requested a review from hasnainvirk July 31, 2018 10:28
@@ -398,18 +398,18 @@ bool ATCmdParser::process_oob()
struct oob *oob = _oobs;
while (oob) {
if (i == (int)oob->len && memcmp(
oob->prefix, _buffer, oob->len) == 0) {
oob->prefix, _buffer, oob->len) == 0) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could fit on the same line like

if (i == (int)oob->len && memcmp(oob->prefix, _buffer, oob->len) == 0) {

Copy link
Contributor

@hasnainvirk hasnainvirk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Just a minor comment.

@@ -20,15 +20,13 @@

TEST_GROUP(AT_CellularBase)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For being consistent with function expansion, please change, void setup() { to:

void setup()
{
}

as it was originally. Martin will be patching astyle script to ignore expanding functions in the pre-processed objects like TEST_GROUP.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, I'll check these macros and will need to be ignored not to be changed as they are not seen by formatter (is it a function/class/etc) so its treated as function by default.

Ignore TEST_GROUP by AStyle. As this uses macro, is not visible to formatter.
By default, it assumes it is a function and treats methods as blocks inside a
function (inlined {}). We ignore it.

We might just not format UNITTESTS in the future if we face similar issues
in the future.
@0xc0170
Copy link
Contributor Author

0xc0170 commented Jul 31, 2018

All TEST_GROUP were fixed

@cmonr
Copy link
Contributor

cmonr commented Jul 31, 2018

/morph build

@mbed-ci
Copy link

mbed-ci commented Jul 31, 2018

Build : SUCCESS

Build number : 2709
Build artifacts/logs : http://mbed-os.s3-website-eu-west-1.amazonaws.com/?prefix=builds/7621/

Triggering tests

/morph test
/morph uvisor-test
/morph export-build
/morph mbed2-build

@mbed-ci
Copy link

mbed-ci commented Jul 31, 2018

@mbed-ci
Copy link

mbed-ci commented Aug 1, 2018

@0xc0170
Copy link
Contributor Author

0xc0170 commented Aug 1, 2018

@ARMmbed/mbed-os-maintainers Please review

@cmonr cmonr merged commit 94d1b98 into ARMmbed:master Aug 1, 2018
pan- pushed a commit to pan-/mbed that referenced this pull request Aug 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants