Closed (fixed)
Project:
BACnet
Version:
7.x-1.0
Component:
Code
Priority:
Minor
Category:
Task
Assigned:
Reporter:
Created:
6 Aug 2014 at 13:02 UTC
Updated:
29 Sep 2014 at 10:04 UTC
Jump to comment: Most recent, Most recent file
Loaded Coder on local dev site to review code independent from http://pareview.sh/pareview/httpgitdrupalorgsandboxdbt1022237027git . Coder review did not report any critical errors, which is a good thing of course. Closing out the issue https://www.drupal.org/node/2314451 for now because that review is far to nit picking at this stage of development. Creating this issue to track cleanup of more minor warnings/errors report by Coder module review.
| Comment | File | Size | Author |
|---|
Comments
Comment #1
dbt102 commentedCoder found 1 projects, 18 files, 25 normal warnings, 464 minor warnings, 0 warnings were flagged to be ignored
Will go thru these file by file to cleanup.
BACNET.MODULEBACNET-VIEW-ROW-BARGRAPH.TPL.PHPBACNET-VIEW-ROW-DIAL.TPL.PHPBACNET-VIEW-ROW-LINEGRAPH.TPL.PHPBACNET-VIEW-ROW-TEXT.TPL.PHPBACNET-VIEW-STYLE-TREND.TPL.PHP
BACNET-VIEW-STYLE-VALUEGRAPHIC.TPL.PHP
BACNET-VIEW-STYLE-VALUETEXT.TPL.PHP
BACNET.INSTALL
BACNET/JS/DRUPAL.BACNET.JSBACNET.VIEWS.INC
BACNET_PLUGIN_ROW_BARGRAPH.INC
BACNET_PLUGIN_ROW_DIAL.INC
BACNET_PLUGIN_ROW_LINEGRAPH.INC
BACNET_PLUGIN_ROW_TEXT.INC
BACNET_PLUGIN_STYLE_TREND.INC
BACNET_PLUGIN_STYLE_VALUEGRAPHIC.INC
BACNET_PLUGIN_STYLE_VALUETEXT.INC
Comment #2
dbt102 commentedOn bacnet.module
Before cleanup - FOUND 192 ERRORS AND 13 WARNINGS AFFECTING 159 LINES.
After cleanup -- FOUND 6 ERRORS AND 13 WARNINGS AFFECTING 18 LINES
Patch file is attached
Comment #4
dbt102 commentednow going to cleanup BACNET-VIEW-ROW-BARGRAPH.TPL.PHP
Before cleanup codesniffer FOUND 13 ERRORS AFFECTING 8 LINES
After cleanup code sniffer FOUND 6 ERRORS AND 1 WARNING AFFECTING 2 LINES
Committed changes
Comment #5
dbt102 commentedComment #6
dbt102 commentedCleanup attempted for BACNET-VIEW-ROW-DIAL.TPL.PHP - -> Codesniffer FOUND 6 ERRORS AND 1 WARNING AFFECTING 2 LINES, but none of these were corrected when running phpcbf
Codesniffer ran on BACNET-VIEW-ROW-LINEGRAPH.TPL.PHP and FOUND 13 ERRORS AND 1 WARNING AFFECTING 9 LINES
After running phpcbf code sniffer found FOUND 6 ERRORS AND 1 WARNING AFFECTING 2 LINES
These updates were committed.
Comment #8
dbt102 commentedmodified: bacnet.install
modified: bacnet.views.inc
modified: bacnet_plugin_row_bargraph.inc
modified: bacnet_plugin_row_dial.inc
modified: bacnet_plugin_row_linegraph.inc
modified: bacnet_plugin_row_text.inc
modified: bacnet_plugin_style_trend.inc
modified: bacnet_plugin_style_valuegraphic.inc
modified: bacnet_plugin_style_valuetext.inc
and committed
Comment #10
dbt102 commentedClosing out the Code cleanup for now because I completed the review and code edits using phpcbf per review comments by @Sachini.
Will create additional tickets for additional code review.
Comment #11
dbt102 commentedReopening this issue to rerun codersniffer and log additional efforts to cleanup code.
Comment #12
dbt102 commentedTook out comments that were used to implement php code to get, cache and parse SOAP data.
Comment #13
dbt102 commentedComment #14
dbt102 commentedNeed to rerun code beautify due to all the new features that have been added.
Presently at FOUND 192 ERRORS AND 32 WARNINGS AFFECTING 166 LINES and PHPCBF CAN FIX THE 114 MARKED SNIFF VIOLATIONS AUTOMATICALLY
Comment #17
dbt102 commentedRunning code sniffer locally from terminal appears to be having memory difficulties of some kind, so the files patched do not seem to being being saved correctly. Try making another commit to watch this more carefully.
After running cbf message corrections is down to FOUND 78 ERRORS AND 32 WARNINGS AFFECTING 83 LINES
Comment #18
dbt102 commentedYep, for some reason the preview reviews do not seem to be keeping up with file updates, even though the new git address is used. So ignoring the preview for now, and just focus on local coder review, this time for bacnet.install
FOUND 102 ERRORS AND 4 WARNINGS AFFECTING 99 LINES &
PHPCBF CAN FIX THE 86 MARKED SNIFF VIOLATIONS AUTOMATICALLY
so after fix
FOUND 16 ERRORS AND 5 WARNINGS AFFECTING 16 LINES
Comment #20
dbt102 commentedtkuldeep17's comment's need to be addressed.
1. function bacnet_theme is no longer being used ==> I removed this.
2. you are not using $user variable anywhere ==> I removed this too.
3. use 'drupal_set_message' ==> OK, did this the Drupal way using 'drupal_set_message'
4. correct the php syntax in use of bacnet_node_form ==> I corrected this
5. There are a lot of paraview issues ==> I agree!! I'm working on these slowly but surely so make sure you are using the most recent commit. It seem like pareview does not automatically update to the most recent commit.
Comment #22
dbt102 commentedUsing Coder module on local dev I was able to cleanup code on the bacnet.module so that Coder output returned "No Problems Found".
Comment #24
dbt102 commentedUsing Coder module on local dev I was able to cleanup code on the bacnet.install so that Codesniffer output was clean.
Comment #26
dbt102 commentedRemoved curly braces that were not needed.
Comment #28
dbt102 commentedAs per comment and attached file at https://www.drupal.org/node/2312955#comment-9059829 this issue has been fixed so will mark it as closed for now.
Comment #29
dbt102 commentedA bit more cleanup added after adding feature request for additional content type fields.
Comment #30
dbt102 commentedworking thru the minor warnings now.
Comment #32
dbt102 commentedCleaned up most minor warnings on file bacnet_plugin_row_dial.inc.
Comment #34
dbt102 commentedCleaned up most minor warnings on file bacnet_plugin_row_linegraph.inc
Comment #36
dbt102 commentedoops...
After making the some of the changes that Coder was asking, which is mind numbing, I thought to check before I got TOOO far into it. Went to views that were working just fine and now I get this
Guess I need to back out some of the changes.
Comment #37
dbt102 commentedBacked the the changes made to the class and uses_fields().
the format it liked is class "bacnet_plugin_row_bargraph" and "function uses_fields()". Coder wanted "BacnetPluginRowBargraph" and "function usesFields()"
Comment #38
dbt102 commentedCleaned up most minor warnings on file bacnet_plugin_style_trend.inc .
Comment #40
dbt102 commentedCleaned up most minor warnings on file BACNET_PLUGIN_STYLE_VALUEGRAPHIC.INC .
Comment #42
dbt102 commentedCleaned up most minor warnings on file BACNET_PLUGIN_STYLE_VALUETEXT.INC
Comment #45
dbt102 commenteddown to just a few at this pt
Coder found 1 projects, 18 files, 1 normal warnings, 80 minor warnings, 0 warnings were flagged to be ignored
Comment #51
dbt102 commentedClosing this because I think the only items left are being discussed under the False Positive issue here --> https://www.drupal.org/node/2324941
Comment #52
dbt102 commentedComment #53
dbt102 commentedOpening back up to cleanup more Pareview issues introduced when implementing new features at #2337583: Supporting future BACnet standards
Comment #56
dbt102 commentedAdding unix style line endings reduced the number of preview issues down to just one, so closing out this issue again
https://www.drupal.org/node/2312955#comment-9149435
Comment #57
dbt102 commented