Skip to content

Commit

Permalink
Add phpcs execution to GHA, plus change log updates
Browse files Browse the repository at this point in the history
  • Loading branch information
stronk7 committed Feb 24, 2024
1 parent 970108b commit 34f501a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/phpcs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ jobs:
if: ${{ !cancelled() }}
run: ./vendor/bin/phpcpd --exclude moodle/Tests moodle

- name: Coding style
if: ${{ !cancelled() }}
run: ./vendor/bin/phpcs -s .

- name: Run phpunit
if: ${{ !cancelled() }}
run: |
Expand Down
15 changes: 9 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
# Change log

All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).
This project adheres to [Semantic Versioning](https://semver.org/).

The format of this change log follows the advice given at [Keep a CHANGELOG](http://keepachangelog.com).
The format of this change log follows the advice given at [Keep a CHANGELOG](https://keepachangelog.com).

## [Unreleased]
### Added
- Add new `moodle.Commenting.Package` sniff to replace those present in moodle-local_moodlecheck.
- Add new `moodle.Commenting.Category` sniffs to replace those present in moodle-local_moodlecheck.
- New `phpcs.xml.dist` to enforce the coding style to follow by ´moodle-cs´ itself. Basically, PSR12 ruled. CI verified from now on.

### Changed
- Update composer dependencies to current versions, notably `PHP_CodeSniffer` (3.9.0) and `PHPCompatibility` (e5cd2e24).

### Added
- Add new moodle.Commenting.Package sniffs to replace those present in moodle-local_moodlecheck.
- Add new moodle.Commenting.Category sniffs to replace those present in moodle-local_moodlecheck.
- As part of the move to be PSR12 compliant, all the methods used for testing have been converted, without deprecation, to camel case (`setStandard()`, `setSniff()`, ...).
- ACTION REQUIRED: Any clone/fork using `moodle-cs` and having own tests will need to adapt them to the new method names.

### Fixed
- The moodle.Files.MoodleInternal sniff no longer treats Attributes as side-effects.
Expand Down

0 comments on commit 34f501a

Please sign in to comment.