Skip to content

Fix capitalization style for UUID and constant names #437

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 12 commits into from
Feb 28, 2020

Conversation

lukerayman
Copy link
Contributor

@lukerayman lukerayman commented Feb 28, 2020

In some places there was a different capitalization for the UUID part of names. This PR capitalizes all UUIDs like regular words - Uuid, except strings and comments. Reference: DO capitalize acronyms and abbreviations longer than two letters like words.

I also found SCREAMING_CAPSand UpperCamelCase styles in constant names in ble_error.dart, so I also fixed it by applying the style preferred by Dart. Reference: PREFER using lowerCamelCase for constant names.

There was a naming inconsistency for a parameter holding the value of a characteristic. In some places it was named bytes. I renamed it to value wherever I found it.

@lukerayman lukerayman self-assigned this Feb 28, 2020
@mikolak mikolak merged commit e9cc958 into develop Feb 28, 2020
@mikolak mikolak deleted the fix/style-capitalization branch February 28, 2020 12:07
mikolak added a commit that referenced this pull request Mar 10, 2020
* Fix capitalization style for UUID and constant names (#437)

* Fix capitalization of UUID in Service

* Fix capitalization of UUID in ScanResult

* Fix capitalization of UUID in Peripheral

* Rename bytes to value

* Fix capitalization of UUID in metadata strings in ScanResult

* Fix constants capitalization in BleError

* Revert "Fix capitalization of UUID in metadata strings in ScanResult"

This reverts commit 08516ec.

* Fix capitalization of UUID in managers for classes

* Fix capitalization of UUID for InternalBleManager

* Fix capitalization of UUID in CharacteristicsMixin

* Fix capitalization of UUID in DevicesMixin

* Rename bytes to value in internal classes

* Add unit tests for Service (#439)

* unit test for BleManager

* [descriptor] override equals & hashcode functions

* [tests] add: mock classes for managers

* [service] add: service tests

* [tests] create characteristics and descriptors using separate generators

* [service][tests] cover generating transactionId when it's not specified

* [service][tests] clear mocks interactions after each test

* [service][tests] add missing test for getting all descriptors for specified characteristic

Co-authored-by: Paweł Byszewski <4048063+pawelByszewski@users.noreply.github.com>

* Bump MBA and lib version

Co-authored-by: Łukasz Rejman <lukasz.rejman@polidea.com>
Co-authored-by: Bartosz Wilk <bartosz.wilk@polidea.com>
Co-authored-by: Paweł Byszewski <4048063+pawelByszewski@users.noreply.github.com>
mikolak added a commit that referenced this pull request May 7, 2020
* Fix capitalization style for UUID and constant names (#437)

* Fix capitalization of UUID in Service

* Fix capitalization of UUID in ScanResult

* Fix capitalization of UUID in Peripheral

* Rename bytes to value

* Fix capitalization of UUID in metadata strings in ScanResult

* Fix constants capitalization in BleError

* Revert "Fix capitalization of UUID in metadata strings in ScanResult"

This reverts commit 08516ec.

* Fix capitalization of UUID in managers for classes

* Fix capitalization of UUID for InternalBleManager

* Fix capitalization of UUID in CharacteristicsMixin

* Fix capitalization of UUID in DevicesMixin

* Rename bytes to value in internal classes

* Add unit tests for Service (#439)

* unit test for BleManager

* [descriptor] override equals & hashcode functions

* [tests] add: mock classes for managers

* [service] add: service tests

* [tests] create characteristics and descriptors using separate generators

* [service][tests] cover generating transactionId when it's not specified

* [service][tests] clear mocks interactions after each test

* [service][tests] add missing test for getting all descriptors for specified characteristic

Co-authored-by: Paweł Byszewski <4048063+pawelByszewski@users.noreply.github.com>

* Descriptor unit tests (#441)

* unit test for BleManager

* [descriptor] override equals & hashcode functions

* [tests] add: mock classes for managers

* [tests] create characteristics and descriptors using separate generators

* [descriptor] add: tests

* [descriptor] fix: test names

* [tests] move all mocks declarations to one aggregate file

* [ble-manager][test] add matcher to always check objects' references

* [descriptor][test] add tests that check uniquity of transactionId

Co-authored-by: pawelByszewski <pawell.b@gmail.com>

* [iOS] Fixed casting of Bool arguments received from dart (#451)

* Remove root level `Flutter User Facing API.dart` (#455) 

* rename root level file

naming interfered with certain build_runner code generators

* remove flutter_user_facing_api.dart

* Release 2.2.4

Co-authored-by: Łukasz Rejman <lukasz.rejman@polidea.com>
Co-authored-by: Bartosz Wilk <bartosz.wilk@polidea.com>
Co-authored-by: Paweł Byszewski <4048063+pawelByszewski@users.noreply.github.com>
Co-authored-by: pawelByszewski <pawell.b@gmail.com>
Co-authored-by: Tomasz Bogusz <tomasz.bogusz@polidea.com>
Co-authored-by: Dustin Graham <dcgraham7@gmail.com>
mikolak added a commit that referenced this pull request Jun 10, 2020
* Fix capitalization style for UUID and constant names (#437)

* Fix capitalization of UUID in Service

* Fix capitalization of UUID in ScanResult

* Fix capitalization of UUID in Peripheral

* Rename bytes to value

* Fix capitalization of UUID in metadata strings in ScanResult

* Fix constants capitalization in BleError

* Revert "Fix capitalization of UUID in metadata strings in ScanResult"

This reverts commit 08516ec.

* Fix capitalization of UUID in managers for classes

* Fix capitalization of UUID for InternalBleManager

* Fix capitalization of UUID in CharacteristicsMixin

* Fix capitalization of UUID in DevicesMixin

* Rename bytes to value in internal classes

* Add unit tests for Service (#439)

* unit test for BleManager

* [descriptor] override equals & hashcode functions

* [tests] add: mock classes for managers

* [service] add: service tests

* [tests] create characteristics and descriptors using separate generators

* [service][tests] cover generating transactionId when it's not specified

* [service][tests] clear mocks interactions after each test

* [service][tests] add missing test for getting all descriptors for specified characteristic

Co-authored-by: Paweł Byszewski <4048063+pawelByszewski@users.noreply.github.com>

* Descriptor unit tests (#441)

* unit test for BleManager

* [descriptor] override equals & hashcode functions

* [tests] add: mock classes for managers

* [tests] create characteristics and descriptors using separate generators

* [descriptor] add: tests

* [descriptor] fix: test names

* [tests] move all mocks declarations to one aggregate file

* [ble-manager][test] add matcher to always check objects' references

* [descriptor][test] add tests that check uniquity of transactionId

Co-authored-by: pawelByszewski <pawell.b@gmail.com>

* [iOS] Fixed casting of Bool arguments received from dart (#451)

* Remove root level `Flutter User Facing API.dart` (#455) 

* rename root level file

naming interfered with certain build_runner code generators

* remove flutter_user_facing_api.dart

* Handle destroyClient call on iOS (#461)

* Handle destroyClient call on iOS

* Add missing semicolon

* [Android] Fix race condition in ConnectionStateStreamHanderl (#468) (#469)

* [Android] Fix race condition in ConnectionStateStreamHanderl (#468)

Add extra null check and synchronized block in async callback

* [Android] Move json generation back into try catch block (#468)

* Update pubspec format (#418)

* Remove author field

* Add supported platforms

* Enforce Flutter version

* Release 2.2.5

Co-authored-by: Łukasz Rejman <lukasz.rejman@polidea.com>
Co-authored-by: Bartosz Wilk <bartosz.wilk@polidea.com>
Co-authored-by: Paweł Byszewski <4048063+pawelByszewski@users.noreply.github.com>
Co-authored-by: pawelByszewski <pawell.b@gmail.com>
Co-authored-by: Tomasz Bogusz <tomasz.bogusz@polidea.com>
Co-authored-by: Dustin Graham <dcgraham7@gmail.com>
Co-authored-by: Leo Huang <leo.tx.huang@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants