mkuczera / react-native-haptic-feedback

React-Native Haptic Feedback for iOS with Android similar behaviour.
MIT License
879 stars 109 forks source link

Refactor: Align Package Name with Directory Structure for vibrateFactory #109

Closed abuciuman closed 1 year ago

abuciuman commented 1 year ago

Problem

During an analysis of the react-native-haptic-feedback library using the Android Analyzer, a discrepancy was identified between the package declaration and the corresponding directory structure. The error flagged was:

Package name 'com.mkuczera' does not correspond to the file path 'com.mkuczera.VibrateFactory'

This mismatch not only confuses code readers but also potentially disrupts some tools from working correctly. Such an inconsistency, although not strictly mandated by the Java language, is important to address to ensure consistency and optimal functionality across various toolchains and IDEs.

Solution

To address the highlighted inconsistency:

  1. Package Name Update: I changed the package name from com.mkuczera to com.mkuczera.vibrateFactory to better align with the class's purpose and ensure it matches its directory.

  2. Directory Structure Adjustment: The folder previously named VibrateFactory has been renamed to vibrateFactory (in camelCase) to reflect conventional Java naming standards and ensure alignment with the updated package name.

mkuczera commented 1 year ago

Fixed in 2.1.0, currently in beta to test it. Thanks for your PR :)