Question: Enforcing Coding standards for Github repositories across team

Question

Enforcing Coding standards for Github repositories across team

Answers 1
Added at 2016-11-22 15:11
Tags
Question

We are using Github as VCS for our Java project. I am figuring out ways to enforce coding standards before pushing to remote repositories for members of my team.

On researching, I came across this github pre-commit web hooks. 

But after research found out that it isn't possible to maintain the scripts centrally within the repository. So I have few questions at this point.

  1. Is pre-commit hooks a right way to enforce coding standards across team ? (I know it definitely isn't but wanna hear it from the experienced guys)

  2. If enforcing coding standards is feasible only at the Continous integration stage then with what tools do I achieve that to enforce Java coding standards for my projects across the team ?

My question is something similar on the lines of this one '

How to enforce Coding Standard for the repository located in GIthub

Answers
nr: #1 dodano: 2016-11-22 16:11

What kind of coding standards do you want to enforce?

If you want to prevent possible problems that can be found with static code analysis with tools like PMD and checkstyle, you can integrate these checks within your continuous integration server and make the build fail if specific checks fail.

[edit] sorry, my answer is very similar to the one of the other question - in which point does your question differ from the other one?

Source Show
◀ Wstecz