Skip to content
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

Add PHP linting #47

Merged
merged 4 commits into from
May 19, 2020
Merged

Add PHP linting #47

merged 4 commits into from
May 19, 2020

Conversation

jrtashjian
Copy link
Member

@jrtashjian jrtashjian commented May 7, 2020

Current linting report:

FILE: tests/test-class-gem-form-fields.php
----------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------
 20 | WARNING | Possible useless method overriding detected
    |         | (Generic.CodeAnalysis.UselessOverridingMethod.Found)
----------------------------------------------------------------------


FILE: tests/test-class-gem-settings-controls.php
----------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------
 21 | WARNING | Possible useless method overriding detected
    |         | (Generic.CodeAnalysis.UselessOverridingMethod.Found)
----------------------------------------------------------------------


FILE: includes/settings.php
----------------------------------------------------------------------
FOUND 0 ERRORS AND 6 WARNINGS AFFECTING 5 LINES
----------------------------------------------------------------------
 303 | WARNING | Comment refers to a TODO task "Remove HTML from the
     |         | translation strings"
     |         | (Generic.Commenting.Todo.TaskFound)
 319 | WARNING | This comment is 53% valid code; is this commented
     |         | out code? (Squiz.PHP.CommentedOutCode.Found)
 580 | WARNING | Comment refers to a TODO task
     |         | (Generic.Commenting.Todo.CommentFound)
 583 | WARNING | Processing form data without nonce verification.
     |         | (WordPress.Security.NonceVerification.Recommended)
 583 | WARNING | Processing form data without nonce verification.
     |         | (WordPress.Security.NonceVerification.Recommended)
 852 | WARNING | Only one object structure is allowed in a file
     |         | (Generic.Files.OneObjectStructurePerFile.MultipleFound)
----------------------------------------------------------------------


FILE: includes/render.php
----------------------------------------------------------------------
FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 3 LINES
----------------------------------------------------------------------
 102 | WARNING | Only one object structure is allowed in a file
     |         | (Generic.Files.OneObjectStructurePerFile.MultipleFound)
 148 | WARNING | Comment refers to a TODO task
     |         | (Generic.Commenting.Todo.CommentFound)
 182 | WARNING | Comment refers to a TODO task
     |         | (Generic.Commenting.Todo.CommentFound)
----------------------------------------------------------------------


FILE: godaddy-email-marketing.php
----------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------
 117 | WARNING | Comment refers to a TODO task
     |         | (Generic.Commenting.Todo.CommentFound)
----------------------------------------------------------------------

@AnthonyLedesma
Copy link
Member

Pushed up major changes and fixed all phpcs errors. Only warnings remain. Updated PR description with the remaining warnings.

@jrtashjian jrtashjian self-assigned this May 19, 2020
@jrtashjian jrtashjian changed the title Adding php linting Add PHP linting May 19, 2020
@jrtashjian jrtashjian merged commit 532e6d5 into develop May 19, 2020
@jrtashjian jrtashjian deleted the add-phpcs-linting branch May 19, 2020 21:57
EvanHerman added a commit that referenced this pull request Jun 8, 2021
* Fix deploy task

* Add npmrc

* Update travis config

* Support banners and youtube in readme, add video

* Use hqdefault for video thumbnail

* GoLF Automated checkin by kchien (2/21/2017 4:30:02 PM)

* Update cssmin package ver

* Fix makepot task

* Update POT

* Update mo

* Bump tested up to 4.8

* Bump tested up to

* Switch wp_nonce to _wpnonce. Fix failing check_admin_referer when action === 'refresh'

* Update devDependencies

* set dist: precise for 5.2

* set dist: precise for 5.2

* Temporarily disable PHP 5.2. See travis-ci/travis-ci#8072

* Update dev dependencies. Re-grunt

* Update changelog with 1.2.1 changes

* Change Text Domain to Match WordPress.org Plugin Slug (#26)

* update text domain for interested translators on translation.wordpress.org to work on plugin strings.

* change text domain to match plugin slug in comments

* fixing according to travis ci warnings

only the i18n warnings.

* more fixes based on travis ci output

* fixing other warnings

* one more warning

* renamed language files to match text domain

https://developer.wordpress.org/plugins/internationalization/how-to-internationalize-your-plugin/#loading-text-domain

* Add GDPR Support (#28)

* Add support for GDPR fields.

* Update gruntfile and npm dependencies

* Add comment for tos_link

* Resolve PHPCS warnings. Update phpcs.ruleset.xml.

* Remove test filter

* Add xmllint addon to travis build config

* Double check for method before calling it. Update checkbox field value to match disply text.

* Update gem-form-fields test to asset invalid_field_type returns empty.

* Readd vendor dir to PHPCS exclusion

* Add test for tos_link

* Add test for tracking_option

* Remove chrome from travis addons

* Remove print

* Add spacing for phpcs warnings

* Add required checkboxes to error checking

* Update update-pot grunt task. Regenerate translations after i18n function updates and updated i18n comments

* Update read for 1.3.0 release

* [dist] update packages

* [dist] New package-lock

* Introduce GEM Gutenberg block (#31)

* Start to build out GEM gutenberg block

* Save block output with proper shortcode

* Add .babelrbs and webpack.config.js to .distignore

* Resolve PHPCS warnings

* Dynamically generate the GEM form in the GEM block

* Bump tested up to version to 5.0

* Fix PHPCS spacing

* Dynamic gem block

* Update dynamic blocks

* Add GEM block screenshots and update readme

* Clean up UX during block addition/form selection. Cleanup JS file.

* Add docblock to class prop

* Update changelog, regenerate readme

* Update GEM select field label

* Update godaddy-email-marketing-sign-up-forms-ru_RU.po (#33)

Added RU for several messages (Thank you for signing up, There was a problem).

* Fix cache being bypassed when fetching forms (#34)

* Regenerate mo files. Update changelog for 1.4.1. Regerate readme.md

* Fix help tab iframe url with www (#37)

* Fix help tab iframe URL for non-US locales

* Fix help tab iframe URL for non-US locales

* Update readme with 1.4.2 changes

* Bump tested up to to 5.2

* Remove $ reference and fix SVG icon (#39)

* Remove $ reference and fix SVG icon

* Remove console log from testing

* Test plugin with WP 5.4 and minor style fix (#40)

* Remove $ reference and fix SVG icon

* Remove console log from testing

* updated for 5.4

* tweak readme

* revert version bump changes

* fix json

Co-authored-by: Evan Herman <evan.m.herman@gmail.com>
Co-authored-by: Evan Herman <evanmherman@gmail.com>

* Update readme for 1.4.3 release (#43)

* remove grunt-dev-update dependency (#46)

* Add PHP linting (#47)

* Adding php linting

* automated fixes

* fix all phpcs errors

* phpcs fixes

Co-authored-by: AnthonyLedesma <anthonymledesma@gmail.com>

* Bump tested up to 5.7 (#65)

* Bump tested up to 5.7

* Bump dealerdirect/phpcodesniffer-composer-installer

Co-authored-by: Frankie Jarrett <fjarrett@gmail.com>
Co-authored-by: GoLF <loc-support@godaddy.com>
Co-authored-by: Robert Sim <robertsky@users.noreply.github.com>
Co-authored-by: Evan Herman <evanmherman@gmail.com>
Co-authored-by: Jonathan Bardo <bardo.jonathan@gmail.com>
Co-authored-by: beebeatle <ab2009ukr@gmail.com>
Co-authored-by: Aaron D. Campbell <aaron@xavisys.com>
Co-authored-by: Anthony Ledesma <30462574+AnthonyLedesma@users.noreply.github.com>
Co-authored-by: JR Tashjian <jrtashjian@gmail.com>
Co-authored-by: AnthonyLedesma <anthonymledesma@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.

None yet

2 participants