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

Enable buildifier #27

Merged
merged 7 commits into from
Oct 8, 2024
Merged

Enable buildifier #27

merged 7 commits into from
Oct 8, 2024

Conversation

michael-sbarra-apexai
Copy link
Contributor

No description provided.

@michael-sbarra-apexai
Copy link
Contributor Author

generate_ros2_config.py isn't completely buildifier friendly right now; it adds two trailing newlines to the setup_*.lock.bzl files. Not sure where the issue is.

@michael-sbarra-apexai
Copy link
Contributor Author

michael-sbarra-apexai commented Oct 7, 2024

generate_ros2_config.py isn't completely buildifier friendly right now; it adds two trailing newlines to the setup_*.lock.bzl files. Not sure where the issue is.

Figured it out, the print(build_load_command(repo, spec), file=output_file) should only print the \n for all entries in repo.items() except for the last one. Adding a fix.

The fix is to change print with output_file.write. Then to only write the \n between build_load_commands with an additional check.

@kilian-funk kilian-funk merged commit b9e6eee into main Oct 8, 2024
2 checks passed
@kilian-funk kilian-funk deleted the 20-enable-buildifier branch October 8, 2024 00:53
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 this pull request may close these issues.

2 participants