Skip to content

Commit

Permalink
Setup codesniffer for coding standards
Browse files Browse the repository at this point in the history
  • Loading branch information
duncan3dc committed Oct 30, 2024
1 parent afec9e1 commit 4869248
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/buildcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ jobs:
- name: PHPUnit
run: docker exec ci vendor/bin/phpunit

- name: Coding Standards
run: docker exec ci vendor/bin/phpcs

- name: Composer Validate
run: docker exec ci composer validate --strict

Expand Down
3 changes: 0 additions & 3 deletions .styleci.yml

This file was deleted.

2 changes: 2 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"require-dev": {
"mockery/mockery": "^1.4.2",
"mikey179/vfsstream": "^1.6.10",
"squizlabs/php_codesniffer": "^3.10",
"phpunit/phpunit": "^9.5.10"
},
"suggest": {
Expand All @@ -42,6 +43,7 @@
"scripts": {
"test": [
"vendor/bin/phpunit",
"vendor/bin/phpcs",
"@composer validate --strict"
]
}
Expand Down
26 changes: 26 additions & 0 deletions phpcs.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?xml version="1.0"?>
<ruleset name="CLImate">

<file>src</file>
<file>tests</file>

<rule ref="PSR1" />
<rule ref="PSR2" />
<rule ref="PSR12" />

<rule ref="Generic.Files.LineLength">
<severity>0</severity>
</rule>
<rule ref="PSR1.Files.SideEffects.FoundWithSymbols">
<severity>0</severity>
</rule>
<rule ref="PSR1.Methods.CamelCapsMethodName.NotCamelCaps">
<severity>0</severity>
</rule>
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace">
<properties>
<property name="ignoreBlankLines" value="false" />
</properties>
</rule>

</ruleset>

0 comments on commit 4869248

Please sign in to comment.