Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Empty psalm xml shows as 1 violation #15

Open
lsv opened this issue Oct 7, 2021 · 1 comment
Open

Empty psalm xml shows as 1 violation #15

lsv opened this issue Oct 7, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@lsv
Copy link

lsv commented Oct 7, 2021

Psalm XML

<?xml version="1.0" encoding="UTF-8"?>
<report>
  <item/>
</report>

Shows this html

MicrosoftTeams-image

@asgrim asgrim added the bug Something isn't working label Oct 7, 2021
@asgrim
Copy link
Member

asgrim commented Oct 22, 2021

Interesting; this is actually per expectations. In the XSL:

<h1>Total violations: <xsl:value-of select="count(//report/item)" /></h1>

In the sample empty report here, there is indeed one //report/item element, so this is why it displays 1.

Might be worth checking if there's an xsl selector for non-empty //report/item elements only.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants