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

WIP: Introduce CS Fixer #1991

Draft
wants to merge 11 commits into
base: master
Choose a base branch
from
10 changes: 10 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,16 @@ env:

jobs:
include:
- name: Coding Standards
# stage: cs
php:
- 8.3
dregad marked this conversation as resolved.
Show resolved Hide resolved
env: []
services: []
before_script: []
script:
- echo "Executing Mantis coding style checks"
- vendor/bin/ecs check
# Add a specific build for Documentation
- name: Documentation
env: DOCBOOK=1
Expand Down
1 change: 1 addition & 0 deletions build/buildrelease.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
# Directories
"docbook/",
"tests/"
"ecs.php"
)

# Checksum types to includ in digest filese
Expand Down
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
},
"require-dev": {
"ext-zip": "*",
"phpunit/phpunit": "^9.6"
"phpunit/phpunit": "^9.6",
"symplify/easy-coding-standard": "^12.1"
},
"repositories": [
{
Expand Down
62 changes: 60 additions & 2 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

31 changes: 31 additions & 0 deletions ecs.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?php
# MantisBT - A PHP based bugtracking system
#
# MantisBT is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
# MantisBT is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with MantisBT. If not, see <https://www.gnu.org/licenses/>.

declare( strict_types = 1 );

use Symplify\EasyCodingStandard\Config\ECSConfig;

return ECSConfig::configure()
->withPaths([
__DIR__ . '/',
])
->withSkip([
__DIR__ . '/build',
__DIR__ . '/config',
__DIR__ . '/library',
])
->withRules([])
;