Skip to content

Conversation

@datamweb
Copy link
Contributor

@datamweb datamweb commented Jul 30, 2024

Description
It seems that phpcpd was not setuped correctly. I couldn't figure out why.

https://github.com/codeigniter4/CodeIgniter4/actions/runs/10152748314/job/28077826735?pr=9085

Run shivammathur/setup-php@v2
/usr/bin/bash /home/runner/work/_actions/shivammathur/setup-php/v2/src/scripts/run.sh

==> Setup PHP
✓ PHP Updated to PHP 8.1.29

==> Setup Extensions
✓ dom Enabled
✓ mbstring Enabled

==> Setup Tools
✓ composer Added composer 2.[7](https://github.com/codeigniter4/CodeIgniter4/actions/runs/10166194607/job/28115790693?pr=9090#step:3:8).7
✗ phpcpd Could not setup phpcpd

==> Sponsor setup-php
✓ setup-php https://setup-php.com/sponsor
0s
Run phpcpd --exclude system/Test --exclude system/ThirdParty --exclude system/Database/SQLSRV/Builder.php --exclude system/Database/SQLSRV/Forge.php --exclude system/Database/MySQLi/Builder.php --exclude system/Database/OCI[8](https://github.com/codeigniter4/CodeIgniter4/actions/runs/10166194607/job/28115790693?pr=9090#step:3:9)/Builder.php --exclude system/Database/Postgre/Builder.php --exclude system/Debug/Exceptions.php --exclude system/HTTP/SiteURI.php --exclude system/Validation/Rules.php --exclude system/Autoloader/Autoloader.php --exclude system/Config/Filters.php -- app/ public/ system/
/usr/local/bin/phpcpd: line 1: error: command not found
Error: Process completed with exit code [12](https://github.com/codeigniter4/CodeIgniter4/actions/runs/10166194607/job/28115790693?pr=9090#step:3:13)7.

Checklist:

  • Securely signed commits
  • Component(s) with PHPDoc blocks, only if necessary or adds value
  • Unit testing, with >80% coverage
  • User guide updated
  • Conforms to style guide

@kenjis kenjis added the github_actions Pull requests that update Github_actions code label Jul 30, 2024
@kenjis
Copy link
Member

kenjis commented Jul 30, 2024

Unfortunately, that did not work. Please drop the last two commits.

Run phpcpd app/ public/ system/ --exclude system/Test
  phpcpd app/ public/ system/ --exclude system/Test
  --exclude system/ThirdParty
  --exclude system/Database/SQLSRV/Builder.php
  --exclude system/Database/SQLSRV/Forge.php
  --exclude system/Database/MySQLi/Builder.php
  --exclude system/Database/OCI8/Builder.php
  --exclude system/Database/Postgre/Builder.php
  --exclude system/Debug/Exceptions.php
  --exclude system/HTTP/SiteURI.php
  --exclude system/Validation/Rules.php
  --exclude system/Autoloader/Autoloader.php
  --exclude system/Config/Filters.php
  shell: /usr/bin/bash -e {0}
  env:
    COMPOSER_PROCESS_TIMEOUT: 0
    COMPOSER_NO_INTERACTION: 1
    COMPOSER_NO_AUDIT: 1
phpcpd 6.0.3 by Sebastian Bergmann.

Found 11 clones with 439 duplicated lines in 15 files:

  - /home/runner/work/CodeIgniter4/CodeIgniter4/app/Config/Filters.php:27-105 (78 lines)
    /home/runner/work/CodeIgniter4/CodeIgniter4/system/Config/Filters.php:40-118

  - /home/runner/work/CodeIgniter4/CodeIgniter4/system/Autoloader/Autoloader.php:496-567 (71 lines)
    /home/runner/work/CodeIgniter4/CodeIgniter4/system/CodeIgniter.php:238-309

  - /home/runner/work/CodeIgniter4/CodeIgniter4/system/Debug/BaseExceptionHandler.php:101-150 (49 lines)
    /home/runner/work/CodeIgniter4/CodeIgniter4/system/Debug/Exceptions.php:379-428

  - /home/runner/work/CodeIgniter4/CodeIgniter4/system/Database/BaseBuilder.php:659-697 (38 lines)
    /home/runner/work/CodeIgniter4/CodeIgniter4/system/Database/SQLSRV/Builder.php:119-157

  - /home/runner/work/CodeIgniter4/CodeIgniter4/system/Debug/BaseExceptionHandler.php:70-106 (36 lines)
    /home/runner/work/CodeIgniter4/CodeIgniter4/system/Debug/Exceptions.php:342-378

  - /home/runner/work/CodeIgniter4/CodeIgniter4/system/Validation/Rules.php:125-159 (34 lines)
    /home/runner/work/CodeIgniter4/CodeIgniter4/system/Validation/StrictRules/Rules.php:145-179

  - /home/runner/work/CodeIgniter4/CodeIgniter4/system/Validation/Rules.php:184-217 (33 lines)
    /home/runner/work/CodeIgniter4/CodeIgniter4/system/Validation/StrictRules/Rules.php:206-239

  - /home/runner/work/CodeIgniter4/CodeIgniter4/system/HTTP/SiteURI.php:337-368 (31 lines)
    /home/runner/work/CodeIgniter4/CodeIgniter4/system/HTTP/URI.php:1038-1069

  - /home/runner/work/CodeIgniter4/CodeIgniter4/system/Database/BaseBuilder.php:2623-2648 (25 lines)
    /home/runner/work/CodeIgniter4/CodeIgniter4/system/Database/Postgre/Builder.php:326-351

  - /home/runner/work/CodeIgniter4/CodeIgniter4/system/Database/BaseBuilder.php:3083-3107 (24 lines)
    /home/runner/work/CodeIgniter4/CodeIgniter4/system/Database/SQLSRV/Builder.php:613-637

  - /home/runner/work/CodeIgniter4/CodeIgniter4/system/Database/Forge.php:1150-1170 (20 lines)
    /home/runner/work/CodeIgniter4/CodeIgniter4/system/Database/SQLSRV/Forge.php:305-325

0.39% duplicated lines out of 111222 total lines of code.
Average size of duplication is 39 lines, largest clone has 78 of lines

https://github.com/codeigniter4/CodeIgniter4/actions/runs/10171059110/job/28131363812?pr=9090

@datamweb datamweb force-pushed the use-org-github-action branch 2 times, most recently from eb19031 to 8f46c88 Compare July 31, 2024 00:03
@datamweb
Copy link
Contributor Author

Thanks @kenjis, I have created the code readability, please review.

@paulbalandan
Copy link
Member

Try this: options: >- instead of double quotes

@datamweb
Copy link
Contributor Author

Thanks @paulbalandan, applied.

@kenjis
Copy link
Member

kenjis commented Jul 31, 2024

@datamweb @paulbalandan Thanks! LGTM!

@kenjis kenjis merged commit f9d77a2 into codeigniter4:develop Jul 31, 2024
@datamweb datamweb deleted the use-org-github-action branch July 31, 2024 01:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

github_actions Pull requests that update Github_actions code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants