You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2021/01/11 21:12:54 UTC

[GitHub] [apisix] jbampton opened a new pull request #3247: feat: add basic EditorConfig file to help maintain consistent coding …

jbampton opened a new pull request #3247:
URL: https://github.com/apache/apisix/pull/3247


   …styles
   
   From the website -> "EditorConfig helps maintain consistent coding styles for multiple developers working on the same project across various editors and IDEs. The EditorConfig project consists of a file format for defining coding styles and a collection of text editor plugins that enable editors to read the file format and adhere to defined styles. EditorConfig files are easily readable and they work nicely with version control systems."
   
   https://editorconfig.org/
   
   Download a plugin here:
   https://editorconfig.org/#download
   
   ### What this PR does / why we need it:
   
   Helps to standardize and maintain the code.
   
   ### Pre-submission checklist:
   
   * [X] Did you explain what problem does this PR solve? Or what new features have been added?
   * [ ] Have you added corresponding test cases?
   * [ ] Have you modified the corresponding document?
   * [ ] Is this PR backward compatible? **If it is not backward compatible, please discuss on the [mailing list](https://github.com/apache/apisix/tree/master#community) first**
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] jbampton commented on pull request #3247: feat: add basic EditorConfig file to help maintain consistent coding …

Posted by GitBox <gi...@apache.org>.
jbampton commented on pull request #3247:
URL: https://github.com/apache/apisix/pull/3247#issuecomment-808720531


   Hello @Yiyiyimu I think we should get this one merged so people can start using it.
   
   We could stay with the current GitHub Actions or move to the GitHub Super Linter or perhaps use pre-commit.
   
   But I think EditorConfig is useful anyway.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] jbampton closed pull request #3247: feat: add basic EditorConfig file to help maintain consistent coding …

Posted by GitBox <gi...@apache.org>.
jbampton closed pull request #3247:
URL: https://github.com/apache/apisix/pull/3247


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] spacewander commented on pull request #3247: feat: add basic EditorConfig file to help maintain consistent coding …

Posted by GitBox <gi...@apache.org>.
spacewander commented on pull request #3247:
URL: https://github.com/apache/apisix/pull/3247#issuecomment-760004801


   I think if this feature requires some self-control, some people may break it or any people may break it sometimes. Personally I don't want to maintain a doom-to-broken rule.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] spacewander commented on pull request #3247: feat: add basic EditorConfig file to help maintain consistent coding …

Posted by GitBox <gi...@apache.org>.
spacewander commented on pull request #3247:
URL: https://github.com/apache/apisix/pull/3247#issuecomment-758324392


   Is there a way to lint if the code obeys the EditorConfig?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] Yiyiyimu commented on pull request #3247: feat: add basic EditorConfig file to help maintain consistent coding …

Posted by GitBox <gi...@apache.org>.
Yiyiyimu commented on pull request #3247:
URL: https://github.com/apache/apisix/pull/3247#issuecomment-768794122


   Hi @jbampton since the content of this PR would be moved to #3045, could we close it?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] jbampton commented on pull request #3247: feat: add basic EditorConfig file to help maintain consistent coding …

Posted by GitBox <gi...@apache.org>.
jbampton commented on pull request #3247:
URL: https://github.com/apache/apisix/pull/3247#issuecomment-758423265


   The EditorConfig file works with your editor.   Most editors have support for it already.
   
   Basically it will `lint` the file that you have open in your editor automatically.
   
   For example `adding a new line to the end of files` that don't have one.
   
   There are two ways people use linters:
   
   - lint the whole codebase everytime
   - lint only the modified files
   
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] spacewander commented on pull request #3247: feat: add basic EditorConfig file to help maintain consistent coding …

Posted by GitBox <gi...@apache.org>.
spacewander commented on pull request #3247:
URL: https://github.com/apache/apisix/pull/3247#issuecomment-758483524


   What if the contributors don't care about the editorConfig? Can we lint it in the CI?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] jbampton commented on pull request #3247: feat: add basic EditorConfig file to help maintain consistent coding …

Posted by GitBox <gi...@apache.org>.
jbampton commented on pull request #3247:
URL: https://github.com/apache/apisix/pull/3247#issuecomment-760205521


   Also you might want to know that a lot of the world's top projects use the EditorConfig standard seen here:
   
   https://github.com/editorconfig/editorconfig/wiki/Projects-Using-EditorConfig
   
   Yes we should move this PR and include it in the GitHub Super Linter PR #3045 


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] Yiyiyimu commented on pull request #3247: feat: add basic EditorConfig file to help maintain consistent coding …

Posted by GitBox <gi...@apache.org>.
Yiyiyimu commented on pull request #3247:
URL: https://github.com/apache/apisix/pull/3247#issuecomment-809002482


   > Yes we should move this PR and include it in the GitHub Super Linter PR #3045
   
   Hi @jbampton I thought we've already moved this PR to #3045 🤣 
   Besides, if I take it right, we could only check `EditorConfig` when we have `Super Linter`, so it would be better to merge #3045 first and then this one I think.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] spacewander edited a comment on pull request #3247: feat: add basic EditorConfig file to help maintain consistent coding …

Posted by GitBox <gi...@apache.org>.
spacewander edited a comment on pull request #3247:
URL: https://github.com/apache/apisix/pull/3247#issuecomment-760004801


   ~~I think if this feature requires some self-control, some people may break it or any people may break it sometimes. Personally I don't want to maintain a doom-to-broken rule.~~
   
   Sorry, it is my mistake. I didn't recognize the SuperLint can check it. Should we add editorconfig-checker in this PR too?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] jbampton commented on pull request #3247: feat: add basic EditorConfig file to help maintain consistent coding …

Posted by GitBox <gi...@apache.org>.
jbampton commented on pull request #3247:
URL: https://github.com/apache/apisix/pull/3247#issuecomment-759981662


   If the contributors don't care and don't install the EditorConfig plugin then it won't bother them.  But most editors already provide support.
   
   Yes we can lint on the CI for the EditorConfig rules 👍 
   
   The GitHub Super Linter can check EditorConfig as well as Lua 💯 
   
   https://github.com/github/super-linter
   https://github.com/editorconfig-checker/editorconfig-checker
   https://editorconfig-checker.github.io/
   
   refs #3045 
   
   <img width="1024" alt="Screen Shot 2021-01-14 at 5 20 01 pm" src="https://user-images.githubusercontent.com/418747/104557518-19504300-568d-11eb-8eca-00908418eb5d.png">
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org