PathOfBuilding icon indicating copy to clipboard operation
PathOfBuilding copied to clipboard

Add best practices documentation

Open Wires77 opened this issue 3 years ago • 3 comments

This is a rough draft and very much a work in progress, as it's the first time we're writing these down. I'll work with the other maintainers to refine these standards until they're satisfactory, as they're very much just my understanding.

Wires77 avatar Oct 21 '21 17:10 Wires77

I like those. A few suggestions if I may:

  • In terms of code style, maybe we can try to use a code formatter like LuaFormatter to automatically apply the styles. We could then add to the pull request pipeline to verify if it's correct. It Will be much easier to maintain than reviewing styles on PRs
  • We could add a PR template and make sure people follow it
  • This is not really a suggestion, but I believe not everybody has permission to add Labels on PRs, we should verify on the repo settings

jppianta avatar Oct 21 '21 18:10 jppianta

* In terms of code style, maybe we can try to use a code formatter like [LuaFormatter](https://github.com/Koihik/LuaFormatter) to automatically apply the styles. We could then add to the pull request pipeline to verify if it's correct. It Will be much easier to maintain than reviewing styles on PRs

Yeah, the coding style might get broken down into a larger document, but if we can codify it with a formatter/linter config, that would be ideal. I'd want to play around with LuaFormatter to get it to not mangle the codebase too much, at least to start, but if it works that'd be great

* We could add a PR template and make sure people follow it

Added a template in #3542 I may keep some of this section around, but most of it will be covered by the template

* This is not really a suggestion, but I believe not everybody has permission to add Labels on PRs, we should verify on the repo settings

This is true....I was hoping the PR template could work like the issue templates and auto-assign labels, but it doesn't appear to be the case.

Wires77 avatar Oct 21 '21 22:10 Wires77

"Do use LDoc notation when creating new functions" Going to this url reveals a program not a document. perhaps a more direct url or other quote/example.

pHiney avatar Nov 01 '21 09:11 pHiney