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

Use real configuration file instead of Package.swift code #19

Open
Jeehut opened this issue Apr 29, 2019 · 3 comments · May be fixed by #49
Open

Use real configuration file instead of Package.swift code #19

Jeehut opened this issue Apr 29, 2019 · 3 comments · May be fixed by #49

Comments

@Jeehut
Copy link

Jeehut commented Apr 29, 2019

The README doesn't really explain, why the configuration of the commits has to be done within Package.swift and I find it very confusing and misplaced there. To me, the example configuration looks like it should actually be just a configuration file (using YAML, TOML or whatever you prefer) like this (komondor.yml):

pre-push: swift test
pre-commit":
  - swift test
  - swift run swiftFormat .
  - swift run swiftlint autocorrect --path Sources/
  - git add .

I feel like that would be much cleaner. But feel free to explain, why you opted for the current solution. Maybe I don't see the whole picture ...

@orta
Copy link
Member

orta commented Apr 29, 2019

I don't want my project littered with lots of annoying small files like that, that's all. Keeping all your settings inside one file makes it much easier to jump between projects.

@Jeehut
Copy link
Author

Jeehut commented Apr 29, 2019

How do "annoying small files" make it harder to jump between projects? When I change from one project to another, I either use the Finder or a Terminal and in both the number of files don't have any effect on changing between projects. So I don't really understand that point.

Also I completely disagree with "small files" being an annoying thing. If anything, I consider separating different things into different files a good thing. Especially given that the Package.swift file is considered to (quote) "define the package’s name and its contents" I really don't see how something like a git hooks configuration fits in there.

But that's just my point of view, it's hard to discuss preferences. But I feel like many would rather have at least the option to separate this into a configuration file.

@orta
Copy link
Member

orta commented Apr 29, 2019

You're welcome to that opinion 👍 - I really only build things that I'm going to use and so my tools are opinionated, I'll happily accept PRs that add something like that with a good set of tests so it doesn't break in the future.

@ivanlisovyi ivanlisovyi linked a pull request Nov 21, 2021 that will close this issue
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

Successfully merging a pull request may close this issue.

2 participants