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

Pre-commit: Consider changing the formatter settings for revision.cmake file #27

Closed
vid553 opened this issue Jul 3, 2024 · 2 comments
Closed
Labels
type: feature request New feature or request.

Comments

@vid553
Copy link
Contributor

vid553 commented Jul 3, 2024

Context

I think that the current formatting of the revision.cmake file is not very user friendly and could be made better, to be the same as it is written by Nordic and Zephyr. Consider changing this.

Currently, the file will be formatted like this:

board_check_revision(
  FORMAT
  MAJOR.MINOR.PATCH
  VALID_REVISIONS
  1.0.0
  2.0.0
  EXACT
  DEFAULT_REVISION
  2.0.0)

It would be much more readable if it would look similar to what is written on these links:

Required steps / Implementation details

Change the formatting settings for these files.

Definition of Done

Described feature is implemented.

@vid553 vid553 added the type: feature request New feature or request. label Jul 3, 2024
@MarkoSagadin
Copy link
Collaborator

Sadly that can not be done.

As far as I can tell, Zephyr contributors format CMake files manually, that's why the CMake files in links look like that.

Our formatter (cmake_format) just aligns the function parameters one below another (if maximum column length is reached), this is the default.

To achieve what you want, the formatter would have to know the relationships between the function parameters, to group them nicely, which it doesn't.

Please close the issue, if you are satisfied with the explanation.

@vid553
Copy link
Contributor Author

vid553 commented Aug 19, 2024

Closing this based on the discussion we had some time ago and your comment above.
(it's a minor thing anyway)

@vid553 vid553 closed this as completed Aug 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature request New feature or request.
Projects
None yet
Development

No branches or pull requests

2 participants