Skip to content

Commit

Permalink
Skip comments in pom.xml dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
simisimon committed Dec 6, 2024
1 parent af9e9ee commit 6045c6c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/cfgnet/plugins/concept/maven_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ def is_responsible(self, abs_file_path: str) -> bool:
def parse_tree(self, subtree_root: _Element, parent_node: Node):
name = subtree_root.tag

# remove prefix in curly brackets
name = self._remove_prefix(name=name)

if name:
Expand Down Expand Up @@ -154,6 +153,8 @@ def _get_fully_qualified_name(self, subtree: _Element) -> str:
groupID = None
version = None
for child in subtree:
if child.tag is ET.Comment:
continue
tag = self._remove_prefix(name=child.tag)
if tag == "artifactId":
artifactID = child.text
Expand Down
1 change: 1 addition & 0 deletions tests/files/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<!--<scope>runtime</scope>-->
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
Expand Down

0 comments on commit 6045c6c

Please sign in to comment.