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

Closes #20 : Group rules into few categories by priority #23

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 5 additions & 19 deletions ecs.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,6 @@
imports:
- { resource: '%vendor_dir%/symplify/easy-coding-standard/config/set/symfony.yaml' }
- { resource: '%vendor_dir%/symplify/easy-coding-standard/config/set/clean-code.yaml' }
- { resource: '%vendor_dir%/symplify/easy-coding-standard/config/set/php70.yaml' }
- { resource: '%vendor_dir%/symplify/easy-coding-standard/config/set/php71.yaml' }
- { resource: '%vendor_dir%/symplify/easy-coding-standard/config/set/psr2.yaml' }

services:
PhpCsFixer\Fixer\Import\OrderedImportsFixer:
sort_algorithm: 'length'
PhpCsFixer\Fixer\PhpTag\LinebreakAfterOpeningTagFixer: ~
PhpCsFixer\Fixer\FunctionNotation\MethodArgumentSpaceFixer:
ensure_fully_multiline: false

parameters:
skip:
PhpCsFixer\Fixer\Phpdoc\PhpdocAlignFixer: ~
PhpCsFixer\Fixer\Phpdoc\PhpdocInlineTagFixer: ~
PhpCsFixer\Fixer\Phpdoc\PhpdocSeparationFixer: ~
PhpCsFixer\Fixer\PhpTag\BlankLineAfterOpeningTagFixer: ~
- { resource: 'standards/php.yaml' }
- { resource: 'standards/symfony.yaml' }
- { resource: 'standards/akeneo.yaml' }
- { resource: 'standards/clean-code.yaml' }
- { resource: 'standards/other.yaml' }
14 changes: 14 additions & 0 deletions standards/akeneo.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#
# This file should contain up-to-date coding rules set by Akeneo core team. It should include the following:
#
# Versioning and dependencies: https://docs.akeneo.com/master/technical_architecture/best_practices/project.html
# Bundle creation: https://docs.akeneo.com/master/technical_architecture/best_practices/reusable_bundle.html
# Code conventions: https://docs.akeneo.com/master/technical_architecture/best_practices/core/conventions.html
# Code standards: https://docs.akeneo.com/master/technical_architecture/best_practices/core/standards.html
#
services:
# https://docs.akeneo.com/master/technical_architecture/best_practices/core/standards.html

# Add a single space around operators (==, &&, …);
PhpCsFixer\Fixer\Operator\ConcatSpaceFixer:
spacing: one
7 changes: 7 additions & 0 deletions standards/clean-code.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#
# This file should contain up-to-date coding practices covered by these clean code books:
# https://www.amazon.com/Robert-C.-Martin/e/B000APG87E
# and any other content of "clean code" movement that do not contradict the current message of the author.
#
imports:
- { resource: '%vendor_dir%/symplify/easy-coding-standard/config/set/clean-code.yaml' }
20 changes: 20 additions & 0 deletions standards/other.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#
# There should be nothing in this file that contradicts standards provided by all others, e.g. PHP-FIG, Symfony, etc.
# Therefore it is really under the question if we should have any content in here at all.
#
# In practice, the rule here must match any of issues: https://github.com/digitronas/akeneo-coding-standard/issues
# Therefore it is advisable to provide a link to the coresponding issue after providing the rule itself.
#
#services:
# PhpCsFixer\Fixer\Import\OrderedImportsFixer:
# sort_algorithm: 'length'
# PhpCsFixer\Fixer\PhpTag\LinebreakAfterOpeningTagFixer: ~
# PhpCsFixer\Fixer\FunctionNotation\MethodArgumentSpaceFixer:
# ensure_fully_multiline: false
#
#parameters:
# skip:
# PhpCsFixer\Fixer\Phpdoc\PhpdocAlignFixer: ~
# PhpCsFixer\Fixer\Phpdoc\PhpdocInlineTagFixer: ~
# PhpCsFixer\Fixer\Phpdoc\PhpdocSeparationFixer: ~
# PhpCsFixer\Fixer\PhpTag\BlankLineAfterOpeningTagFixer: ~
9 changes: 9 additions & 0 deletions standards/php.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#
# This file should contain up-to-date coding rules set by PHP.
# It excludes PHP legacy usage, e.g.: https://www.php.net/manual/en/migration70.deprecated.php
# and includes best practices presented by PHP-FIG personnel in the form of PSRs: https://www.php-fig.org/psr/
#
imports:
- { resource: '%vendor_dir%/symplify/easy-coding-standard/config/set/php70.yaml' }
- { resource: '%vendor_dir%/symplify/easy-coding-standard/config/set/php71.yaml' }
- { resource: '%vendor_dir%/symplify/easy-coding-standard/config/set/psr12.yaml' }
6 changes: 6 additions & 0 deletions standards/symfony.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#
# This file should contain up-to-date coding rules set by Symfony core team. It should include the following:
# https://symfony.com/doc/master/contributing/code/standards.html
#
imports:
- { resource: '%vendor_dir%/symplify/easy-coding-standard/config/set/symfony.yaml' }