Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Discussion: how to use in collaborative environments #43

Open
mamouneyya opened this issue Jun 19, 2021 · 4 comments
Open

Discussion: how to use in collaborative environments #43

mamouneyya opened this issue Jun 19, 2021 · 4 comments

Comments

@mamouneyya
Copy link

mamouneyya commented Jun 19, 2021

Interested to hear any thought from the community on how to leverage this in a large team. We have so many separate packages that we would like to automate the process of linting / formatting for each one and without people doing any extra step(s) to setup or execute anything.

I know a server based solution might work better for this use case, but I'm still very interested in exploring any possibility to implement this on the client side, for the very reasons the author of this package listed (e.g. detecting errors as early as possible, having linting and formatting amended to each commit so we have cleaner history, etc.).

I can think of 2 problems right now:

  1. Since Git ignores hooks by default, what would be the best way to share this setup and have it installed on everyone's machine without the need for them to run the install command or anything? (I'm trying to make this 100% transparent to avoid current process's pain which require the engineers to execute a couple of commands where they, especially juniors, can pretty easily forget or get them wrong)
  2. I believe this is easier but I am not very familiar with SPM's executables to confirm. Let's say we could find a solution for (1), and given we have so many packages, what would be an easy way to avoid this boilerplate in each Package.swift manifest file? Can we probably package it as a wrapper executable dependency that can be just added to every package? The goal is to be able to reuse it across different packages with minimal effort and having a centralized single configurations.

Thanks a lot!

@orta
Copy link
Member

orta commented Jun 20, 2021

1, SPM doesn't allow for arbitrary code evaluation so you can't really check if someone has set up the git hook. Perhaps if you use CocoaPods you can use the Podfile to validate that someone has githooks set up

2, Perhaps you could have a shared library, or scripts which are cloned during the repo strapping and are referenced from your Komondor scripts

@mamouneyya
Copy link
Author

1, SPM doesn't allow for arbitrary code evaluation so you can't really check if someone has set up the git hook. Perhaps if you use CocoaPods you can use the Podfile to validate that someone has githooks set up

Let's say we want to re-install them always regardless, how would you execute this automatically and where?

@orta
Copy link
Member

orta commented Jun 22, 2021

In a repo bootstrap shell script maybe?

@minuscorp
Copy link
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants