Coding Standards

Created on 29 November 2018, about 6 years ago
Updated 23 July 2024, 5 months ago

Make this module compatible with Drupal 8 coding standards.

📌 Task
Status

Needs work

Version

1.0

Component

Code

Created by

🇧🇷Brazil leopaccanaro

Live updates comments and jobs are added and updated live.
  • Coding standards

    It involves compliance with, or the content of coding standards. Requires broad community agreement.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • Hi @Diego_Mow,

    Both patches you applied was applied unsuccessfully and both patches resulted to multiple errors. Please see below:

    With md patch:

    cloudflare git:(8.x-1.x) curl https://www.drupal.org/files/issues/2021-06-20/3017018-5--with-md-changes.patch | patch -p1
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100 28235  100 28235    0     0  87211      0 --:--:-- --:--:-- --:--:-- 91080
    patching file README.md
    Hunk #2 FAILED at 29.
    Hunk #3 succeeded at 50 with fuzz 1 (offset 1 line).
    1 out of 3 hunks FAILED -- saving rejects to file README.md.rej
    patching file cloudflare.install
    Hunk #1 succeeded at 48 (offset -7 lines).
    Hunk #2 succeeded at 60 (offset -7 lines).
    patching file docs/disclaimers.md
    Hunk #1 FAILED at 1.
    Hunk #2 succeeded at 20 (offset -4 lines).
    1 out of 2 hunks FAILED -- saving rejects to file docs/disclaimers.md.rej
    patching file docs/enterprise_setup.md
    Hunk #1 FAILED at 2.
    1 out of 1 hunk FAILED -- saving rejects to file docs/enterprise_setup.md.rej
    patching file docs/freetier_setup.md
    Hunk #1 FAILED at 2.
    Hunk #2 succeeded at 16 (offset -1 lines).
    1 out of 2 hunks FAILED -- saving rejects to file docs/freetier_setup.md.rej
    patching file modules/cloudflarepurger/src/Plugin/Purge/DiagnosticCheck/ApiRateLimitCheck.php
    Reversed (or previously applied) patch detected!  Assume -R? [n] y
    Hunk #1 succeeded at 81 (offset 2 lines).
    Hunk #2 succeeded at 98 with fuzz 2 (offset 2 lines).
    patching file modules/cloudflarepurger/src/Plugin/Purge/DiagnosticCheck/ComposerDependenciesCheck.php
    Reversed (or previously applied) patch detected!  Assume -R? [n] y
    patching file modules/cloudflarepurger/src/Plugin/Purge/DiagnosticCheck/CredentialCheck.php
    Reversed (or previously applied) patch detected!  Assume -R? [n] y
    patching file modules/cloudflarepurger/src/Plugin/Purge/DiagnosticCheck/DailyTagPurgeLimitCheck.php
    Reversed (or previously applied) patch detected!  Assume -R? [n] y
    Hunk #1 succeeded at 83 with fuzz 2 (offset 3 lines).
    Hunk #2 succeeded at 102 with fuzz 2 (offset 5 lines).
    can't find file to patch at input line 327
    Perhaps you used the wrong -p or --strip option?
    The text leading up to this was:
    --------------------------
    |diff --git a/src/EventSubscriber/ClientIpRestore.php b/src/EventSubscriber/ClientIpRestore.php
    |index 197beb0..0ea33c7 100644
    |--- a/src/EventSubscriber/ClientIpRestore.php
    |+++ b/src/EventSubscriber/ClientIpRestore.php
    --------------------------
    File to patch:
    Skip this patch? [y] y
    Skipping patch.
    4 out of 4 hunks ignored
    patching file src/Form/SettingsForm.php
    Hunk #1 succeeded at 18 with fuzz 1 (offset -2 lines).
    patching file src/Form/ZoneSelectionForm.php
    Hunk #1 succeeded at 14 (offset -2 lines).
    Hunk #2 FAILED at 239.
    1 out of 2 hunks FAILED -- saving rejects to file src/Form/ZoneSelectionForm.php.rej
    patching file src/State.php
    Reversed (or previously applied) patch detected!  Assume -R? [n] y
    Hunk #2 succeeded at 56 with fuzz 2 (offset 8 lines).
    Hunk #3 succeeded at 81 (offset 3 lines).
    patching file tests/src/Functional/CloudFlareAdminSettingsFormTest.php
    Reversed (or previously applied) patch detected!  Assume -R? [n] y
    patching file tests/src/Functional/CloudFlareAdminSettingsInvalidFormTest.php
    Reversed (or previously applied) patch detected!  Assume -R? [n] y
    patching file tests/src/Functional/ComposerDependencyTest.php
    Reversed (or previously applied) patch detected!  Assume -R? [n] y
    patching file tests/src/Unit/ClientIpRestoreTest.php
    Hunk #1 FAILED at 23.
    Hunk #2 FAILED at 89.
    2 out of 2 hunks FAILED -- saving rejects to file tests/src/Unit/ClientIpRestoreTest.php.rej
    patching file tests/src/Unit/StateTest.php
    Reversed (or previously applied) patch detected!  Assume -R? [n] y
    Hunk #2 succeeded at 67 with fuzz 1 (offset 3 lines).
    Hunk #3 succeeded at 104 (offset 6 lines).
    Hunk #4 succeeded at 138 (offset 6 lines).

    Without md patch:

    cloudflare git:(8.x-1.x) ✗ curl https://www.drupal.org/files/issues/2021-06-20/3017018-5--without-md-changes.patch | patch -p1
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100 16901  100 16901    0     0  51848      0 --:--:-- --:--:-- --:--:-- 53147
    patching file cloudflare.install
    Hunk #1 succeeded at 48 (offset -7 lines).
    Hunk #2 succeeded at 60 (offset -7 lines).
    patching file modules/cloudflarepurger/src/Plugin/Purge/DiagnosticCheck/ApiRateLimitCheck.php
    Reversed (or previously applied) patch detected!  Assume -R? [n] y
    Hunk #1 succeeded at 81 (offset 2 lines).
    Hunk #2 succeeded at 98 with fuzz 2 (offset 2 lines).
    patching file modules/cloudflarepurger/src/Plugin/Purge/DiagnosticCheck/ComposerDependenciesCheck.php
    Reversed (or previously applied) patch detected!  Assume -R? [n]
    Apply anyway? [n] y
    Hunk #1 FAILED at 63.
    1 out of 1 hunk FAILED -- saving rejects to file modules/cloudflarepurger/src/Plugin/Purge/DiagnosticCheck/ComposerDependenciesCheck.php.rej
    patching file modules/cloudflarepurger/src/Plugin/Purge/DiagnosticCheck/CredentialCheck.php
    Reversed (or previously applied) patch detected!  Assume -R? [n] y
    patching file modules/cloudflarepurger/src/Plugin/Purge/DiagnosticCheck/DailyTagPurgeLimitCheck.php
    Reversed (or previously applied) patch detected!  Assume -R? [n] y
    Hunk #1 succeeded at 83 with fuzz 2 (offset 3 lines).
    Hunk #2 succeeded at 102 with fuzz 2 (offset 5 lines).
    can't find file to patch at input line 144
    Perhaps you used the wrong -p or --strip option?
    The text leading up to this was:
    --------------------------
    |diff --git a/src/EventSubscriber/ClientIpRestore.php b/src/EventSubscriber/ClientIpRestore.php
    |index 197beb0..0ea33c7 100644
    |--- a/src/EventSubscriber/ClientIpRestore.php
    |+++ b/src/EventSubscriber/ClientIpRestore.php
    --------------------------
    File to patch: y
    y: No such file or directory
    Skip this patch? [y] y
    Skipping patch.
    4 out of 4 hunks ignored
    patching file src/Form/SettingsForm.php
    Hunk #1 succeeded at 18 with fuzz 1 (offset -2 lines).
    patching file src/Form/ZoneSelectionForm.php
    Hunk #1 succeeded at 14 (offset -2 lines).
    Hunk #2 FAILED at 239.
    1 out of 2 hunks FAILED -- saving rejects to file src/Form/ZoneSelectionForm.php.rej
    patching file src/State.php
    Reversed (or previously applied) patch detected!  Assume -R? [n] y
    Hunk #2 succeeded at 56 with fuzz 2 (offset 8 lines).
    Hunk #3 succeeded at 81 (offset 3 lines).
    patching file tests/src/Functional/CloudFlareAdminSettingsFormTest.php
    Reversed (or previously applied) patch detected!  Assume -R? [n] y
    patching file tests/src/Functional/CloudFlareAdminSettingsInvalidFormTest.php
    Reversed (or previously applied) patch detected!  Assume -R? [n] y
    patching file tests/src/Functional/ComposerDependencyTest.php
    Reversed (or previously applied) patch detected!  Assume -R? [n] y
    patching file tests/src/Unit/ClientIpRestoreTest.php
    Hunk #1 FAILED at 23.
    Hunk #2 FAILED at 89.
    2 out of 2 hunks FAILED -- saving rejects to file tests/src/Unit/ClientIpRestoreTest.php.rej
    patching file tests/src/Unit/StateTest.php
    Reversed (or previously applied) patch detected!  Assume -R? [n] y
    Hunk #2 succeeded at 67 with fuzz 1 (offset 3 lines).
    Hunk #3 succeeded at 104 (offset 6 lines).
    Hunk #4 succeeded at 138 (offset 6 lines).

    Kindly check

    Thanks,
    Jake

Production build 0.71.5 2024