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

Add output parameters 'violations_count' and 'serious_violations_count' #47

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nbeadman
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants