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

Support grumphp.dist.yml #1069

Closed
jreklund opened this issue Feb 17, 2023 · 2 comments
Closed

Support grumphp.dist.yml #1069

jreklund opened this issue Feb 17, 2023 · 2 comments

Comments

@jreklund
Copy link
Contributor

Q A
Version 1.15.0
Bug? no
New feature? yes
Question? yes
Documentation? yes
Related tickets

Before I start coding a solution to add support for grumphp.dist.yml - is this something you want to support?
Currently I'm in the works of changing all configurations to end with the actual file extension e.g. yml to simplify our .editorconfig and to get syntax highlight (without modifications).

Currently we need to add both yml and yml.dist as an supported file extension. It works, but without any syntax highligt.

# YAML
[*.{yml,yml.dist}]
indent_size = 2

grumphp.yml

grumphp:
  ascii: ~
  environment:
    paths:
      - node_modules/.bin
  tasks:
    phpcsfixer:
    phpstan:
      memory_limit: "-1"
    stylelint:
      triggered_by: [scss]
    eslint:
  fixer:
      fix_by_default: true

grumphp.yml.dist

grumphp:
  ascii: ~
  environment:
    paths:
      - node_modules/.bin
  tasks:
    phpcsfixer:
    phpstan:
      memory_limit: "-1"
    stylelint:
      triggered_by: [scss]
    eslint:
  fixer:
      fix_by_default: true

I can see your projects grumphp.yml.dist uses 2 spaces for indention but according to your .editorconfig you let the users editor decide the number of spaces. My editor will break yours as it defaults to 4 spaces. You also would need two file-extensions in your .editorconfig (or default into 2 spaces).


Some examples in the documentation uses 2 spaces but most are using 4 spaces. I think that needs to be standardized. Is this something you want help with?

@veewee
Copy link
Contributor

veewee commented Feb 17, 2023

Thanks for reporting.
We currently didn't keep that specific issue in mind - but I don't mind having it normalized.
Feel free to provide a PR for that!

On top of the regular yml and yml.dist, We also allow .yaml and .yaml.dist.

It might even be better if we added a task that checks the code with the editor config as well.
That way we can either adjust the code or the editor config accordingly.

@jreklund
Copy link
Contributor Author

I took a quick look at an editorconfig-checker and it may fail on some markdown files. Currently there are yaml, json and php tags in the documentation and they have a different indentation style. There are also some paragraphs getting indented with 4 or more spaces.

@veewee veewee closed this as completed Feb 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants