You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by GitBox <gi...@apache.org> on 2019/11/02 02:05:49 UTC

[GitHub] [cordova-android] breautek opened a new pull request #859: Removed unnecessary project name restriction

breautek opened a new pull request #859: Removed unnecessary project name restriction
URL: https://github.com/apache/cordova-android/pull/859
 
 
   
   <!--
   Please make sure the checklist boxes are all checked before submitting the PR. The checklist is intended as a quick reference, for complete details please see our Contributor Guidelines:
   
   http://cordova.apache.org/contribute/contribute_guidelines.html
   
   Thanks!
   -->
   
   ### Platforms affected
   Android
   
   
   ### Motivation and Context
   <!-- Why is this change required? What problem does it solve? -->
   <!-- If it fixes an open issue, please link to the issue here. -->
   There was a condition in `validateProjectName` that prevented the project name from started with a number. It was found that this was added approximately 5 years ago, and it was assumed that once upon a time, this was because project names were used to generate a java class, based on the comments. However, that no longer appears to be the case.
   
   Being able to support project names that starts with a number is important and perfectly valid (e.g: [8 Ball Pool](https://play.google.com/store/apps/details?id=com.miniclip.eightballpool)).
   
   It fixes #584 and fixes #701  where lots of people requested this change.
   
   
   ### Description
   <!-- Describe your changes in detail -->
   Simply removed the condition preventing project names from starting with a number. `validateProjectName` has two other checks which were left untouched. I've also updated the comments to remove any references suggesting that successful `validateProjectName` calls means its safe to use the string as a java class name.
   
   There was a unit test test for failure for project names starting with numbers which have been removed. Two items were added for the `valid` list for valid name checks which includes names starting with numbers.
   
   ### Testing
   <!-- Please describe in detail how you tested your changes. -->
   Manual testing using:
   - `cordova platform add`
   - `cordova build android`
   - `cordova run android`
   
   
   ### Checklist
   
   - [x] I've run the tests to see all new and existing tests pass
   - [x] I added automated test coverage as appropriate for this change
   - [x] Commit is prefixed with `(platform)` if this change only applies to one platform (e.g. `(android)`)
   - [x] If this Pull Request resolves an issue, I linked to the issue in the text above (and used the correct [keyword to close issues using keywords](https://help.github.com/articles/closing-issues-using-keywords/))
   - [x] I've updated the documentation if necessary
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org