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

Enable phpcs and phpcbf checks to run from phar #238

Merged
merged 1 commit into from
Sep 15, 2023

Conversation

stronk7
Copy link
Member

@stronk7 stronk7 commented Sep 11, 2023

Note this is very similar to #237 (that should be merged before this).

We need the 2 CLI scripts and the CodeSniffer.conf file to be added to the phar, so we can "include" the scripts for execution and copy the conf file temporarily to be together with the phar (that's the way CodeSniffer expects it).

Note this will reduce a little bit code-coverage but in a future PR I want to add some integration tests to cover the execution from phar, hardly can be done from unit tests.

@codecov
Copy link

codecov bot commented Sep 11, 2023

Codecov Report

Merging #238 (4d76194) into master (ed8d11b) will increase coverage by 0.04%.
The diff coverage is 100.00%.

@@             Coverage Diff              @@
##             master     #238      +/-   ##
============================================
+ Coverage     84.58%   84.62%   +0.04%     
- Complexity      689      693       +4     
============================================
  Files            74       74              
  Lines          2134     2140       +6     
============================================
+ Hits           1805     1811       +6     
  Misses          329      329              
Files Changed Coverage Δ
src/Command/CodeCheckerCommand.php 100.00% <100.00%> (ø)
src/Command/CodeFixerCommand.php 100.00% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@stronk7 stronk7 force-pushed the enable_phpcs_check_from_phar branch 3 times, most recently from 5021e1d to e9d55b9 Compare September 11, 2023 07:23
We need the 2 CLI scripts and the CodeSniffer.conf file
to be added to the phar, so we can "include" the scripts
for execution and copy the conf file temporarily to
be together with the phar (that's the way CodeSniffer
expects it).

Note this will reduce a little bit code-coverage but in
a future PR I want to add some integration tests to cover
the execution from phar, hardly can be done from unit tests.
@stronk7 stronk7 force-pushed the enable_phpcs_check_from_phar branch from e9d55b9 to 4d76194 Compare September 15, 2023 11:31
@kabalin kabalin self-requested a review September 15, 2023 13:06
@stronk7 stronk7 merged commit 9aeb6ad into moodlehq:master Sep 15, 2023
@stronk7
Copy link
Member Author

stronk7 commented Sep 15, 2023

Thanks, @kabalin , merged!

@stronk7 stronk7 deleted the enable_phpcs_check_from_phar branch September 15, 2023 13:51
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.

2 participants