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

add .editorconfig file #2138

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

add .editorconfig file #2138

wants to merge 2 commits into from

Conversation

lixiaoqity
Copy link

@lixiaoqity lixiaoqity commented Oct 10, 2020

Fix #2125

This file is used to keep all the files consistent. It is convenient for other people to contribute to the same project.


This change is Reviewable

Copy link
Contributor

@jeffwidman jeffwidman left a comment

Choose a reason for hiding this comment

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

Thanks for putting this together... Did you look around at other python-based projects? IMO this is missing some specs...

.editorconfig Outdated
insert_final_newline = true

[*.md]
trim_trailing_whitespace = false
Copy link
Contributor

Choose a reason for hiding this comment

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

looks like this file is lacking the insert_final_newline? 😀

Copy link
Author

Choose a reason for hiding this comment

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

Yes, python files usually have 4 spaces. I have fixed it and add the final newline style for the .md file. Thanks.


[*.md]
trim_trailing_whitespace = false
insert_final_newline = false
Copy link
Contributor

Choose a reason for hiding this comment

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

Why are these both false for markdown? Why not make them true (or more concisely, simply drop the markdown specific section since it is identical to the global config)

Copy link
Author

Choose a reason for hiding this comment

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

These are only common writing formats for some special files. I think it is fine not to add blank line or remove any whitespace characters preceding newline characters in Markdown file. You can set what you want. Just keep all the files consistent. Thanks.

@jeffwidman
Copy link
Contributor

Thanks for updating! Can you clarify why the markdown section has these configs? The other stuff looks good...

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

Successfully merging this pull request may close these issues.

Add a .editorconfig file
3 participants