action-swiftlint
action-swiftlint copied to clipboard
Add output parameters 'violations_count' and 'serious_violations_count'
Adds the ability to check the number of violations and serious violations to fail action if outside of requirements.
For example, to make sure that no more than 6 violations are allow change the .github/workflows/swiftlint.yml
to add the following step:
- name: Check Violations number
if: ${{ steps.swift-lint.outputs.violations_count > 6 }}
run: |
echo "::error::This PR exceed maximum number of allowed violations (6). Actual number is (${{ steps.swift-lint.outputs.violations_count }})"
exit 1
shell: bash