Automated project review for the 7.x-1.x branch reported several errors that we should be able to fix without too much trouble, since it's mostly coding standards errors (spaces missing, wrong indent, missing empty lines, Doc Comments blocks syntax, etc...).
In order to prepare for an upcoming stable release, let's try to bring back module's code in compliance with coding standards and fix all validation errors.
There shouldn't be any change of code, other than the ones recommended by the coding standards PAReview report.
Please let me know if you would have any questions, objections, comments, suggestions, recommendations or concerns on any aspects of this task, I would be glad to provide more information or explain in more details.
Any questions, feedback, testing, changes, recommendations would be highly appreciated.
Thanks to all in advance.
Comments
Comment #1
xiukun.zhou commentedGlad this module is still in Sandbox because bringing it back in compliance with standards really required a major change:
README.txt is missing, see the guidelines for in-project documentation.Added at 1b17f16.For the geofield_baidu_map entire module:
So basically, the name of the module and all function names were not following the standards, as per #2085529-1: False positives on submodule hooks:
In other words, to bring back module in compliance with Coding Standards, the sub-module geofield_baidu_map would have to be renamed to include the name of the main module.
Therefore, the sub-module was renamed: baidu_map_geofied to be prefixed with baidu_map, which is the name of the main module and all function/variables names had to be updated accordingly.
See also: Resolving automated errors: submodules.
This major change was committed against the 7.x-1.x branch at f82bd90.
Most of other issues (related with character encoding for line endings, white spaces, indents and several other issues) could be fixed properly and were committed against the 7.x-1.x branch at 2cb3b7e, a45a9a9 and b1d1c4d.
Now, the only remaining issues reported are:
This error is caused by a key that's missing in an array to add JavaScript for the JS Settings.
It seems this is the exact same error discussed and reporting on the Project Application #1360332-3: QueryLoader2 integration where it didn't seem to be a problem for the Project Application to be accepted.
Unfortunately, currently, I was unable to find any proper way this issue could be resolved.
This is the same problem as reported at #2035305-2: [D7] Views App Folders and it would seem these issues would be minor coding standard errors which are not application blockers (see #2035305-3: [D7] Views App Folders).
Unfortunately, currently, I was unable to find any proper way this issue could be resolved.
Since I believe we have gone as far as we could with Coding Standards compliance, I allowed myself to mark this issue as fixed for now, but feel free to re-open it, or create a new ticket, at any time if you have any further objections with this issue or any of the related commits (f82bd90 2cb3b7e, a45a9a9 and b1d1c4d - we would surely be happy to hear your feedback).
Please let me know if you would have any further comments, feedback, questions, issues, objections, suggestions or concerns on the commits or this task in general, I would be glad to provide more information or explain in more details.
Thanks in advance to everyone for your testing, reviews, feedback and comments on this issue.
Cheers!
Comment #3
xiukun.zhou commentedFollowing up with @klausi's comments in the project application at #2128839-11: [D7] Baidu Map:
Answers:
1. Added calls to t() for the strings mentioned: Yes/No and for the #markup in Views (see related commit below for more information).
I also went through all the strings of the module again to double check if there were any more strings that would potentially be missing a call to a
tfunction and I was unable to find any more.2. To be discussed with @klausi, but this is not third party code and was mostly written/contributed by DYdave, see #2127815: Support for GeoPHP Geometries and all Geofield Widgets
3. Replaced the returned aggregated string with a call to format_string, which should already sanitize replaced values for
@variable, in this case: @width, @height, @container_id and @alt_text - They should all be plain text to be replaced in the returned HTML string (see related commit below for more information).I went ahead and committed the changes against the 7.x-1.x branch at 27bba60.
Please let me know if you would have any further comments, feedback, questions, issues, objections, suggestions or concerns on the latest commit or this task in general, I would be glad to provide more information or explain in more details.
Thanks in advance to everyone for your testing, reviews, feedback and comments on this issue.
Cheers!
Comment #4
xiukun.zhou commentedAnother round of reviews at #2128839-13: [D7] Baidu Map where @klausi caught another missing call to
t()with the DrupalPractice sniffer module (interesting: I wasn't aware of this project):Additionally, it was suggested to try to improve the
@fileDoc comment block in the GeoJSON.js file to let users know it is not third party code and it was actually adapted and inspired from the Geofield Map GeoJSON.js file.I went ahead and committed the changes against the 7.x-1.x branch at ce4aa34.
Please let me know if you would have any further comments, feedback, questions, issues, objections, suggestions or concerns on the latest commit or this task in general, I would be glad to provide more information or explain in more details.
Thanks in advance to everyone for your testing, reviews, feedback and comments on this issue.
Cheers!
Comment #5
xiukun.zhou commentedFollowing up with @patrickd's comment at #2128839-16: [D7] Baidu Map:
which is was a very good suggestion, so a new constant variable was added
BAIDU_MAP_API_KEY_VALIDATE_REGEXto be able to re-use the same regular expression in 3 different files.I went ahead and committed the changes against the 7.x-1.x branch at 8d90970.
Please let me know if you would have any further comments, feedback, questions, issues, objections, suggestions or concerns on the latest commit or this task in general, I would be glad to provide more information or explain in more details.
Thanks in advance to everyone for your testing, reviews, feedback and comments on this issue.
Cheers!