-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Add .editorconfig file #24150
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
Add .editorconfig file #24150
Conversation
Hi @ihor-sviziev. Thank you for your contribution
In case you'd like to rerun tests use the following comments:
For more details, please, review the Magento Contributor Guide documentation. |
Nice, good idea @ihor-sviziev ! I would add an exception for markdown files and set Markdown syntax can have lines ending in a double space which means it should render the following line on a new line, if you don't end it with double spaces, it would be rendered on the same line. Not stripping trailing whitespaces in markdown files would prevent these double spaces from getting accidentally deleted. Not sure if there are markdown files in the repo which make use of these double spaces, but you never know... |
Sure, will update my PR.
Is there any other exceptions that need to be made?
|
Nothing else comes to mind. And searching the web around a bit, I can't find other exceptions which would make sense for Magento code (for example a Would it also make sense to include a static test to enforce the rules from this file? <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
... So adding a static test for these rules is probably not a good idea it doesn't seems to be "smart" enough. |
Add exception for *.md files
Hi @hostep, |
Hi @sidolov, thank you for the review.
|
I have one last remark about this: suppose a developer is already using an
Just something which popped in my mind. Not sure if this is important to consider or not? |
In this case it will be useless as it will not be applied to all people.
For case if we’ll have any issues with this version of editorconfig -
someone will report an issue and we will fix it 🙂
…On Wed, Aug 21, 2019 at 22:15 Pieter Hoste ***@***.***> wrote:
I have one last remark about this: suppose a developer is already using an
.editorconfig file in his Magento project with different configurations
than this one.
Does that mean that when that developer upgrades to - let's say Magento
2.3.4 - this file will overwrite his file? Because that might be a bit
annoying.
Would it make sense to map this file to an .editorconfig.sample file in
the marshalling section of the magento2-base package's composer.json file?
Something like:
"map": [
[
".editorconfig",
".editorconfig.sample"
],
Just something which popped in my mind. Not sure if this is important to
consider or not?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#24150?email_source=notifications&email_token=AAOJOUODM6VOSLNZV2TQZBLQFWH3VA5CNFSM4IMGAD7KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD422JFY#issuecomment-523609239>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAOJOULFABT3HCGYR724DXTQFWH3VANCNFSM4IMGAD7A>
.
|
Hi @ihor-sviziev, thank you for your contribution! |
Description (*)
This PR adds .editorconfig file. It will help IDEs automatically format different types of files correctly.
As an example - right now some files in tests have incorrect line endings.
More info: https://editorconfig.org/
Fixed Issues (if relevant)
N/A
Manual testing scenarios (*)
N/A
Questions or comments
Contribution checklist (*)