Skip to content

Commit

Permalink
WINDUPRULE-964 Fixed application properties file technology rule (#886)…
Browse files Browse the repository at this point in the history
… (#892)

(cherry picked from commit 4893ff6)

Co-authored-by: Marco Rizzi <mrizzi@users.noreply.github.com>
  • Loading branch information
github-actions[bot] and mrizzi committed Mar 10, 2023
1 parent 85d66c0 commit 5f5000b
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,20 @@
</perform>
</rule>
<rule id="configuration-management-technology-usage-0200">
<when>
<graph-query discriminator="TechnologyTagModel">
<property name="name">Application Properties File</property>
</graph-query>
</when>
<perform>
<technology-identified name="Application Properties File">
<tag name="Sustain"/>
<tag name="Configuration Management"/>
<tag name="Embedded"/>
</technology-identified>
</perform>
</rule>
<rule id="configuration-management-technology-usage-0300">
<when>
<graph-query discriminator="TechnologyTagModel">
<property name="name">Spring Properties</property>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@
<file filename="application{profile}.{extension}" />
</when>
<perform>
<classification title="Spring application properties detected" category-id="information" effort="0">
<description>Spring application properties detected</description>
<classification title="Application properties file detected" category-id="information" effort="0">
<description>Application properties file detected</description>
</classification>
<technology-tag level="INFORMATIONAL">Spring Properties</technology-tag>
<technology-tag level="INFORMATIONAL">Application Properties File</technology-tag>
</perform>
<where param="profile">
<matches pattern=".*" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<rule id="configuration-management-technology-usage-0200-test">
<when>
<not>
<technology-statistics-exists name="Spring Properties" number-found="1">
<technology-statistics-exists name="Application Properties File" number-found="1">
<tag name="Sustain"/>
<tag name="Configuration Management"/>
<tag name="Embedded"/>
Expand All @@ -39,6 +39,20 @@
<fail message="Expected data not found for rule configuration-management-technology-usage-0200"/>
</perform>
</rule>
<rule id="configuration-management-technology-usage-0300-test">
<when>
<not>
<technology-statistics-exists name="Spring Properties" number-found="1">
<tag name="Sustain"/>
<tag name="Configuration Management"/>
<tag name="Embedded"/>
</technology-statistics-exists>
</not>
</when>
<perform>
<fail message="Expected data not found for rule configuration-management-technology-usage-0300"/>
</perform>
</rule>
</rules>
</ruleset>
</ruletest>
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
<rule id="configuration-management-0200-test">
<when>
<not>
<classification-exists classification="Spring application properties detected"/>
<technology-tag-exists technology-tag="Spring Properties"/>
<classification-exists classification="Application properties file detected"/>
<technology-tag-exists technology-tag="Application Properties File"/>
</not>
</when>
<perform>
Expand Down

0 comments on commit 5f5000b

Please sign in to comment.