Skip to content

Conversation

@jjaime2
Copy link
Contributor

@jjaime2 jjaime2 commented Feb 26, 2025

Description

This PR adds a pre-commit routine for prettier formatting on Xacro, launch and package XML files. Resolves #56

You must run npm install --save-dev prettier @prettier/plugin-xml prior to pre-commit run --all-files to run prettier with the XML plugin.

Note to reviewers: You don't need to read all the thousands of changed lines, just skim through and notice that our Xacro is actually readable now :)

Testing procedure

This PR does not introduce any fundamental changes to the behavior of the code, it just updates formatting

Before opening a pull request

  • pre-commit run --all-files
  • Run your code through pylint. pylint --recursive=y --rcfile=.pylintrc .. All warnings but fixme must be addressed.

Before Merging

  • Squash & Merge

Copy link

@yewon-lee yewon-lee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, just left one comment for .pre-commit-config.yaml.

Copy link

@sriramk117 sriramk117 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR looks good to me!

@jjaime2 jjaime2 requested a review from yewon-lee March 15, 2025 18:25
@jjaime2 jjaime2 dismissed yewon-lee’s stale review March 15, 2025 21:36

I addressed the requested change, just dismissing the request because it didn't do it automatically when I pushed the commit for some reason

@jjaime2 jjaime2 merged commit 944a2a1 into main Mar 15, 2025
1 check passed
@jjaime2 jjaime2 deleted the jjaime2/ros-precommits branch March 15, 2025 21:36
gurnoork07 pushed a commit to studiorobot/ada_ros2 that referenced this pull request Nov 29, 2025
…package XML files (personalrobotics#58)

* Add pre-commit check for prettier formatting on Xacro, launch and package XML files

* Run pre-commit

* Update repo for Xacro pre-commit hooks, now points to PRL repo
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.

Add XML formatter to pre-commit routine

4 participants