moodlehq / moodle-cs

Moodle Coding Style
https://github.com/moodlehq/moodle-cs
GNU General Public License v3.0
18 stars 15 forks source link

Define moodle-cs own standard, towards better coding #117

Closed stronk7 closed 6 months ago

stronk7 commented 6 months ago

Here we are introducing the phpcs.xml.dist file that will guide our coding style within moodle-cs.

And that's it!

Then, apart of the above, small adjustments to the composer.json and .gitignore files.

stronk7 commented 6 months ago

Created as draft, soon I'll add the BIG commit adapting all the code to the above.

Let's discuss if there is anything else to add / remove in the configuration.

codecov[bot] commented 6 months ago

Codecov Report

Attention: Patch coverage is 99.66667% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 97.29%. Comparing base (e2fdd2f) to head (313e171).

Files Patch % Lines
moodle/Sniffs/Files/MoodleInternalSniff.php 97.82% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #117 +/- ## ============================================ + Coverage 97.15% 97.29% +0.13% Complexity 655 655 ============================================ Files 29 29 Lines 1864 1957 +93 ============================================ + Hits 1811 1904 +93 Misses 53 53 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

stronk7 commented 6 months ago

Ok, I've added 3 more commits, apart from the initial one, described above. This is a summary of all them:

  1. Define the phpcs.xml.dist file, that configures the style to be used with moodle-cs.
  2. Apply all the changes in code base towards being compliant with the style defined & agreed.
  3. Modify the testing API to be, also compliant with the style.
  4. Cover everything @ GHA with a new step that will check for compliance. Plus update changelog.

And that's all. I think this is now complete and can be considered for merging.

Ciao :-)

stronk7 commented 6 months ago

Thanks!