Giter VIP home page Giter VIP logo

Comments (5)

BernieWhite avatar BernieWhite commented on June 14, 2024 1

Thanks @avernigora-clgx for raising an issue. The output you have in the screenshot is expected.

In the summary view today passing rules are compacted into a single item for each resource and errored or failed rules are shown with details.

In the detailed view, each passing or failing/ erroring rule is shown.

While this is the current functionality, what would you like to see in future iterations to make this better?


Also it's worth noting that Assert-PSRule and Invoke-PSRule perform similar functions but display output differently. Assert-PSRule is intended for output in a DevOps pipeline where there is no interactivity of the output but you need as much detail as possible for any issues.

With Invoke-PSRule is follows normal powershell conventions so you can easily filter out data or change the view.

from psrule.

github-actions avatar github-actions commented on June 14, 2024

Thanks for raising your first issue, the team appreciates the time you have taken 😉

from psrule.

avernigora-clgx avatar avernigora-clgx commented on June 14, 2024

Perhaps in this case it is a good idea to update documentation, as I expected to se the summary table, as it is described in the doc

from psrule.

avernigora-clgx avatar avernigora-clgx commented on June 14, 2024

But my personal feeling is that it would be great if smth like this worked

$rx = assert-PSRule -InputPath .\hub\main.non-prod.bicepparam -Module 'PSRule.Rules.Azure' -Format File -Baseline 'Azure.Default' -As Summary -Option $option
$rx | where status -eq 'Failed'

So I can work with these outputs as they were normal .net objects

from psrule.

BernieWhite avatar BernieWhite commented on June 14, 2024

But my personal feeling is that it would be great if smth like this worked

$rx = assert-PSRule -InputPath .\hub\main.non-prod.bicepparam -Module 'PSRule.Rules.Azure' -Format File -Baseline 'Azure.Default' -As Summary -Option $option
$rx | where status -eq 'Failed'

So I can work with these outputs as they were normal .net objects

@avernigora-clgx For this, use Invoke-PSRule which provides .NET objects as is expected in PowerShell.


As mentioned, Assert-PSRule is for DevOps pipelines and integration into Visual Studio Code which only understand text, so formatted output is required.


With Invoke-PSRule you absolutely can do something like | where Outcome -eq 'Fail' in the detailed view (not summary). You could apply you own custom formatting.

I think for the most part the docs shows Invoke-PSRule with the -As Summary. If there is a specific part in the docs that was unclear let me know.

Also both Assert-PSRule and Invoke-PSRule support filtering outcome (status) as parameter -Outcome. i.e. -Outcome Fail or -Outcome Fail,Error.

from psrule.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.