Skip to content

Commit

Permalink
Выполнение вставленного кода, исключающего конструкторы с параметрами…
Browse files Browse the repository at this point in the history
… из вычислений метрики LCOM4, в файле "LCOM4.xsl" позволит корректно обрабатывать только методы класса, не учитывая конструкторы при вычислении связей методов. Таким образом, решается проблема 554.

The inclusion of the code block that excludes constructors with parameters from the calculations of the LCOM4 metric in the "LCOM4.xsl" file effectively resolves issue 554.
  • Loading branch information
michaelwelly committed Jun 25, 2024
1 parent 7371ed2 commit 946762d
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions src/main/resources/org/jpeek/metrics/LCOM4.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -60,18 +60,6 @@ SOFTWARE.
</xsl:variable>
<xsl:variable name="A" select="$attrs_fqn/*/text()"/>
<xsl:variable name="a" select="count($A)"/>
<!-- Считаем только методы (не конструкторы) -->
<xsl:variable name="M" select="methods/method[not(@ctor='true')]" />
<xsl:variable name="m" select="count($M)" />

<!-- Пересчитываем количество соединений методов без конструкторов -->
<xsl:variable name="E">
<xsl:for-each select="$M">
<xsl:variable name="this" select="."/>
<xsl:variable name="this_fullname" select="concat($class_fqn, '.', $this/@name)"/>
<!-- Остальной код остается неизменным -->
</xsl:for-each>
</xsl:variable>
<!-- Ctors are not methods -->
<xsl:variable name="M" select="methods/method[@ctor='false']"/>
<xsl:variable name="m" select="count($M)"/>
Expand Down

0 comments on commit 946762d

Please sign in to comment.