Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Yaml standards#10943

Merged
pamil merged 4 commits into
Sylius:1.5from
sspooky13:yaml-standards
Dec 18, 2019
Merged

Yaml standards#10943
pamil merged 4 commits into
Sylius:1.5from
sspooky13:yaml-standards

Conversation

@sspooky13
Copy link
Copy Markdown
Contributor

Q A
Branch? master
Bug fix? no
New feature? yes
BC breaks? yes
Deprecations? no
License MIT

Hello,
I would like to offer you library which helps you observe some standards.
As you can see I added 3 commits:

    1. just added library to project
    1. added indent check: this will help you observe y(a)ml file pretty
    1. added empty line at the end check: this will help you observe only one empty line at the end...with empty line show you better conflicts

Library of course has more standards but some don't have fixer or it's not relevant for you, so I didn't add it.

Do you have any questions? Something doesn't like you? Feel free to ask 😊

Thank you in advance 🤝

@sspooky13 sspooky13 requested a review from a team as a code owner December 15, 2019 17:59
@Zales0123 Zales0123 added the DX Issues and PRs aimed at improving Developer eXperience. label Dec 15, 2019
Copy link
Copy Markdown
Contributor

@pamil pamil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks cool!

autowire: true
autoconfigure: true

# Uncomment any lines below to activate that Twig extension
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This shouldn't be changed.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll be happy to merge this PR as soon as those lines are ignored by the tool.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello,
I set line indent by his depths but comment line may not have any style. So, if comment line has nearest next non-comment line I set indent by that line but if comment line doesn't have non-comment line I set him zero indents because he does not belong to anyone.
I agree it's not perfect but I think it's the best solution.
How exactly do you imagine logic to skip exactly these lines? 🤔 If you want all comment lines at the end set by nearest non-comment line then it can be not good for another repository where they write at the end some note, for example.

Sorry, if it looks aggressive but it's not 😄 I am only unhappy because I don't know how I can help you with this problem.

What do you think about edit that line to more indents and when you remove # they will have right indents? 🤔

services:
    _defaults:
        public: false
        autowire: true
        autoconfigure: true

#     Uncomment any lines below to activate that Twig extension
#    Twig\Extensions\ArrayExtension: ~
#    Twig\Extensions\DateExtension: ~
#    Twig\Extensions\IntlExtension: ~
#    Twig\Extensions\TextExtension: ~

instead of

services:
    _defaults:
        public: false
        autowire: true
        autoconfigure: true

    # Uncomment any lines below to activate that Twig extension
    #Twig\Extensions\ArrayExtension: ~
    #Twig\Extensions\DateExtension: ~
    #Twig\Extensions\IntlExtension: ~
    #Twig\Extensions\TextExtension: ~

What do you think?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense! Anyway, after giving it a bit more time, we don't really need this file at all in Sylius/Sylius repo :)

@pamil pamil changed the base branch from master to 1.5 December 18, 2019 09:33
@pamil
Copy link
Copy Markdown
Contributor

pamil commented Dec 18, 2019

The base of this pull-request was changed, you need fetch and reset your local branch
if you want to add new commits to this pull request. Reset before you pull, else commits
may become messed-up.

Unless you added new commits (to this branch) locally that you did not push yet,
execute git fetch origin && git reset "yaml-standards" to update your local branch.

Feel free to ask for assistance when you get stuck 👍

@pamil pamil merged commit 7c64a1a into Sylius:1.5 Dec 18, 2019
@pamil
Copy link
Copy Markdown
Contributor

pamil commented Dec 18, 2019

Thank you, Peter! 🎉

@sspooky13
Copy link
Copy Markdown
Contributor Author

I thank you too 😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

DX Issues and PRs aimed at improving Developer eXperience.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants