I was just thinking, do we have a project-wide styleguide that we can apply and consequently fail with CI – so that we don’t deploy code with CI that doesn’t meet those guidelines – in fact we could have a hook that even doesn’t allow people to push their code to github if they don’t meet those guidelines. I wanted to set it up for ID Dashboard, but it could have value across ALL projects, is there a way to do this for all projects?
I’d like to set up a linter to run in a commit hook which will disallow pushing if there are any style violations…but would rather not just make it up without getting community input I’d like something formalized – if we set up up CI – I think this should happen as well.
I suggest that you start by trying to set this up for a specific project (e.g. ID Dashboard).
Once you have a proposed JS style we can consider whether this makes sense across the rest of the OpenMRS codebase, and whether it’s worth the effort to clean up existing code to be compliant.
(The main point is making sure that we have a style that we agree on. Setting up a trigger to check that style is just an implementation detail.)
At AMPATH we have adapted This style for our angular JS application. If it is something acceptable, it could be adapted for general JS programming.
Do you have a linter which can enforce this? In addition to this, I have been hesitant to learn angular due to the uncertainty regarding the (lack of) migration path from Angular 1.x to 2.x.
@r0bby sorry for a late response, yes I do use linter to enforce this style even though I am still learning to use it effectively.
holy moly, that was a late response – it’s all good