Shopsys: coding standards: imported settings are not working

Created on 31 Aug 2020  路  4Comments  路  Source: shopsys/shopsys

What is happening

Some rules (or maybe all? I have randomly discovered NoUnusedImportsFixer and NoWhitespaceInBlankLineFixer) defined in easy-coding-standard-yaml in shopsys/coding-standards package are not applied in our project, even though we include these settings in our easy-coding-standard-yaml:

imports:
    - { resource: '%vendor_dir%/shopsys/coding-standards/easy-coding-standard.yml', ignore_errors: true  }

When I add the fixer in my config, everything works properly.

Expected result

I do not have to re-define rules (checks/fixers) that are already defined in the coding-standards package, i.e. the imports work properly

Bug

All 4 comments

it seems like %vendor_dir% is not set properly :thinking: when I change the path to vendor/shopsys/coding-standards/easy-coding-standard.yml, it starts working on my project properly :+1:

FYI: Will be fixed within fortnight.

Hi @vitek-rostislav thanks for reporting it!

It seems to be related to https://github.com/symplify/symplify/issues/1795. AFAIK the only way is the one you have decribed - replace the variable by path.

fixed in #2026

Was this page helpful?
0 / 5 - 0 ratings