Created
July 3, 2020 10:03
-
-
Save mautz-et-tong/a505f3ca505a20b83b45a0e8aa0fa167 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
parameters: | |
magento_dir: ./www/html | |
bin_dir: "%magento_dir%/vendor/bin" | |
git_dir: "." | |
hide_circumvention_tip: true | |
process_timeout: 120 | |
stop_on_failure: false | |
ignore_unstaged_changes: false | |
tasks: | |
# First everything which lints, secures or verifies something | |
jsonlint: | |
detect_key_conflicts: true | |
metadata: | |
priority: 100 | |
xmllint: | |
ignore_patterns: | |
- "#test/(.*).xml#" | |
metadata: | |
priority: 100 | |
yamllint: | |
ignore_patterns: | |
- "#test/(.*).yml#" | |
- "#charts/.*#" | |
metadata: | |
priority: 100 | |
# filter not allowed keywords | |
git_blacklist: | |
keywords: | |
- "\\.dev" | |
- "\\.local" | |
- "\\.test" | |
- "<<<<<<<" | |
- "=======" | |
- "DebuggerUtility" | |
- "ObjectManager::getInstance" | |
- "_GET\\[" | |
- "_POST\\[" | |
- "_REQUEST\\[" | |
- "console.log\\(" | |
- "die\\(" | |
- "die;" | |
- "exit\\(" | |
- "exit;" | |
- "fileadmin" | |
- "localhost" | |
- "phpinfo" | |
- "phpinfo\\(" | |
- "print_r\\(" | |
- "var_dump\\(" | |
triggered_by: [php, js, html, phtml] | |
metadata: | |
priority: 90 | |
# validate composer json | |
composer: | |
file: "%magento_dir%/composer.json" | |
no_check_all: true | |
no_check_lock: false | |
no_check_publish: false | |
with_dependencies: true | |
strict: false | |
metadata: | |
priority: 80 | |
# run PHP_CodeSniffer | |
phpcs: | |
standard: "Magento2" | |
whitelist_patterns: ["^www/html/app/code/(.*)"] | |
ignore_patterns: ["^www/html/app/code/Magento/(.*)"] | |
tab_width: 4 | |
metadata: | |
priority: 70 | |
# run PHP Mess Detector | |
phpmd: | |
ruleset: ["%magento_dir%/dev/tests/static/testsuite/Magento/Test/Php/_files/phpmd/ruleset.xml"] | |
exclude: | |
- "www/html/app/code/Magento/" | |
- "www/html/app/code/*/*/Setup/" | |
metadata: | |
priority: 70 | |
# validate git branch names | |
git_branch_name: | |
whitelist: | |
- "/(hotfix|bugfix|feature|release)\\/([0-9]+)$/" | |
blacklist: | |
- "develop" | |
- "master" | |
- "infra" | |
allow_detached_head: true | |
# validate git commit message | |
git_commit_message: | |
allow_empty_message: false | |
enforce_capitalized_subject: false | |
enforce_no_subject_punctuations: false | |
enforce_no_subject_trailing_period: true | |
enforce_single_lined_subject: true | |
type_scope_conventions: [] | |
max_body_width: 80 | |
max_subject_width: 80 | |
matchers: | |
"Commit message must contain issue number": /(#\d+|RELEASE):\s.*/ | |
"Commit message must contain issue topic": /^\[(HOTFIX|BUGFIX|FEATURE|INFRA|MERGE|RELEASE)]\s.*/ | |
case_insensitive: true | |
multiline: false | |
additional_modifiers: '' | |
phpcsfixer2: | |
allow_risky: false | |
config: "%magento_dir%/.php_cs" | |
using_cache: true | |
cache_file: "%magento_dir%/.php_cs.cache" | |
config_contains_finder: true | |
verbose: true | |
phpcpd: | |
directory: "%magento_dir%/app/code" | |
exclude: ['Magento','Vicomage','Xtento', 'Mage360', 'Blackbird'] | |
names_exclude: ['*Test.php'] | |
regexps_exclude: [] | |
fuzzy: true | |
min_lines: 13 | |
min_tokens: 70 | |
triggered_by: ['php', 'phtml'] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment