Closed muandrew closed 6 years ago
It's not a big deal since different codebases have different codestyles. I do recommend having a page where you can explain the expectation. It would reduce the amount of back and forth required. The https://github.com/OpenBW/BWAPI4J/blob/develop/CONTRIBUTING.md link seems like a good place to add the guidelines.
I do recommend having a page where you can explain the expectation.
I agree it could be easier to move the PR process along faster if submitters had a clear idea of the expected codestyle. However, there is a wide skill range of users and developers involved. Anywhere from barely out of high school to experienced team leads / senior software engineers. Everyone has different ideas and/or better ideas in some areas than others regardless of skill/experience.
I'd rather not restrict the mindset of submitters with a hard set of guidelines despite my aggressive nitpicking. The perceived guidelines should be just basic ideologies such as consistency, similar formatting (I would like to enforce Google Java Format but that is going to break git blame
), discuss or protest any new ideas or approaches, reduce redundancy, basically anything that helps improve the codebase. I do agree that type of sentiment can be vague or abstract for interpretation.
I, personally, would rather give submitters free range then we pick and choose the best parts and/or discuss it with the rest of the team. Maybe if we lay down a hard set of guidelines which everyone follows to a T, new ideas/formatting/libraries are never exposed such as Google Truth or the consideration of using custom annotations.
You are enforcing guidelines, just spell them out and then add a section to tell people that if they have feedback they should start a thread on the guidelines page. It will help consolidate all of the conversations instead of individual threads. Having guidelines is not a bad thing, having people guess is worse.
As for google code format, its better to break it now than to never get consistency. You can also add it as a git hook so all future commits will retain their arthors history. The codebase will only grow.
Add utility method in separate class to reduce the need to new up Position objects and put in 0,0,dx,dy. Did not change any calculations or method signatures.