Skip to content

doc: add a JQ example #311

@pozil

Description

@pozil

Having a CLI that generates JSON is powerful for automating certain tasks (CI and more). You can easily parse the JSON output with the JQ utility so I think that it's interesting to show a small script example in the readme that demonstrates this:

#!/bin/bash

json=$(sfdx flow:scan)
flowCount=$(echo $json | jq '.summary.totalFlows')
errorCount=$(echo $json | jq '.summary.totalResults')
echo "Scanned $flowCount flows"
echo "Found $errorCount errors"

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationhelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions