Skip to content

Commit

Permalink
xml pre-commit fix
Browse files Browse the repository at this point in the history
  • Loading branch information
woensug-choi committed Jun 28, 2024
1 parent 2f04a8a commit 6aa3b71
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 28 deletions.
27 changes: 16 additions & 11 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,21 @@ repos:
rev: v4.6.0
hooks:
- id: check-added-large-files
args: ["--maxkb=2000"]
- id: check-ast
- id: check-case-conflict
- id: check-docstring-first
- id: check-merge-conflict
- id: check-symlinks
- id: debug-statements
- id: end-of-file-fixer
- id: mixed-line-ending
- id: trailing-whitespace
exclude_types: [rst]
- id: fix-byte-order-marker
- id: check-yaml
- id: destroyed-symlinks
- id: detect-private-key
- id: requirements-txt-fixer

# Python hooks
- repo: https://github.com/asottile/pyupgrade
Expand Down Expand Up @@ -104,10 +108,9 @@ repos:
description: Check format of CMakeLists.txt files.
entry: ament_lint_cmake
additional_dependencies: [ament-lint-cmake-py]
language: system
files: CMakeLists\.txt$
language: python
types: [python]
types: [file]

# Copyright (exclude for now, doesn't exist for nobel
# https://packages.ubuntu.com/search?keywords=ament+copyright&searchon=names)
Expand Down Expand Up @@ -157,16 +160,18 @@ repos:
args: ["--verbose"]

# XML lint for xacro, urdf, and sdf files
- repo: https://github.com/lsst-ts/pre-commit-xmllint
rev: v1.0.0
- repo: https://github.com/pamoller/xmlformatter
rev: v0.2.6
hooks:
- id: format-xmllint
name: xml-lint-robot-files
- id: xml-formatter
name: Format XML
description: Lint XML syntax in xacro, urdf, and sdf files.
entry: check-xmllint
# language: system
types: [text]
files: \.(xacro|urdf|sdf|xml|launch)$
language: python
types: [xml]
entry: xmlformat
args:
- "--overwrite"
files: '\.(xacro|urdf|sdf|xml|launch|world)$'

- repo: https://github.com/turo/pre-commit-hooks
rev: v4.0.0 # You may version pin this if desired
Expand Down
4 changes: 2 additions & 2 deletions dave/package.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0"?>
<?xml version="1.0" encoding="UTF-8"?>
<package format="3">
<name>dave</name>
<version>0.0.0</version>
Expand All @@ -9,4 +9,4 @@
<export>
<build_type>ament_cmake</build_type>
</export>
</package>
</package>
9 changes: 4 additions & 5 deletions examples/dave_demos/package.xml
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
<?xml version="1.0"?>
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<?xml version="1.0" encoding="UTF-8"?>
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?><package format="3">
<name>dave_demos</name>
<version>0.1.0</version>
<description> A package for demo launch files.</description>
<description>A package for demo launch files.</description>
<maintainer email="[email protected]">Rakesh Vivekanandan</maintainer>
<license>MIT</license>
<buildtool_depend>ament_cmake</buildtool_depend>
<export>
<build_type>ament_cmake</build_type>
</export>
</package>
</package>
9 changes: 4 additions & 5 deletions models/dave_object_models/package.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
<?xml version="1.0"?>
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<?xml version="1.0" encoding="UTF-8"?>
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?><package format="3">
<name>dave_object_models</name>
<version>0.1.0</version>
<description> Dave model description files are placed here. </description>
<description>Dave model description files are placed here.</description>
<maintainer email="[email protected]">Rakesh Vivekanandan</maintainer>
<license>MIT</license>
<buildtool_depend>ament_cmake</buildtool_depend>
Expand All @@ -12,4 +11,4 @@
<!-- This doesn't work yet https://github.com/gazebosim/ros_gz/pull/492 -->
<!-- <gazebo_ros gazebo_model_path="${prefix}/meshes"/> -->
</export>
</package>
</package>
7 changes: 3 additions & 4 deletions models/dave_worlds/package.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0"?>
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<?xml version="1.0" encoding="UTF-8"?>
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?><package format="3">
<name>dave_worlds</name>
<version>0.0.0</version>
<description>TODO: Package description</description>
Expand All @@ -12,4 +11,4 @@
<export>
<build_type>ament_cmake</build_type>
</export>
</package>
</package>
3 changes: 2 additions & 1 deletion models/dave_worlds/worlds/dave_Santorini.world
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,8 @@
<near>0.25</near>
<far>25000</far>
</camera_clip>
</plugin>
</plugin>


<!-- Plugins that add functionality to the scene -->
<plugin filename="EntityContextMenuPlugin" name="Entity context menu">
Expand Down

0 comments on commit 6aa3b71

Please sign in to comment.