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

Should .cz.toml actually include the tool table? #1114

Closed
paduszyk opened this issue May 15, 2024 · 5 comments
Closed

Should .cz.toml actually include the tool table? #1114

paduszyk opened this issue May 15, 2024 · 5 comments

Comments

@paduszyk
Copy link
Contributor

Description

I like that the commitizen can be configured via the tool-specific file like .cz.toml.

The configuration is based on the tool root table, e.g.:

[tool.commitizen]
name = "cz_customize"

[tool.commitizen.customize]
# ...

what corresponds to the convention used in pyproject.toml - i.e. the same piece of config as the one above can be copy-pasted directly to pyproject.toml without any updates. That's cool.

I think, however, that the config in .cz.toml should not be based on the tool table, because this may suggest (somewhat) that the file is not entirely commitizen-specific.

Therefore, I would go simply with:

name = "cz_customize"

[customize]
# ...

or

[commitizen]
name = "cz_customize"

[commitizen.customize]
# ...

Of course, one can avoid a breaking change by making this optional.

Possible Solution

References to [tool.commitizen] are found in commitizen.config.toml_config module. Thus, any changes should involve updating the methods of the TomlConfig class.

Additional context

No response

Additional context

There are some Python tools using this approach, e.g.:

The last two of them use INI format, however.

@Lee-W
Copy link
Member

Lee-W commented May 15, 2024

Thanks for opening this issue. Sounds valid to me but could potentially be a breaking change. maybe we could change it in v4. @woile @noirbizarre what do you think?

@woile
Copy link
Member

woile commented May 15, 2024

Personally I like being able to copy-paste, and it's feels like opening the window for a whole new set of bugs for very little in return

@Lee-W
Copy link
Member

Lee-W commented May 16, 2024

I don't have a strong opinion on this one. But if we have an objection from the maintainer, I think we probably won't change this. I'll keep it for a few days before closing it. @paduszyk @noirbizarre please let us know if you have any thought 🙂

@paduszyk
Copy link
Contributor Author

@Lee-W Thanks for considering it anyway 🙂

@Lee-W
Copy link
Member

Lee-W commented May 17, 2024

I'll close it for now and mark it as won't fix till we have a solid rationale to do so. Thanks!

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

No branches or pull requests

3 participants