Skip to content

Added CLI Client + some todos (#30) #2

Added CLI Client + some todos (#30)

Added CLI Client + some todos (#30) #2

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: checkstyle
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the "main" branch
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# The checkstyle job
jobs:
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
# Set up the environment
- name: Env setup
run: |
mkdir -p /opt/lib
wget -q -O /opt/lib/checkstyle.jar https://github.com/checkstyle/checkstyle/releases/download/checkstyle-10.12.6/checkstyle-10.12.6-all.jar
cd "${GITHUB_WORKSPACE}"
# Configures and runs checkstyle
- name: Run Checkstyle
run: |
exec java -jar /opt/lib/checkstyle.jar "." -c "checkstyle_checks.xml" -f xml > results.xml
- name: Print Results
run: echo "$(cat results.xml)"
- name: Check Results
run: |
if grep -q error results.xml; then
echo "Checkstyle found an error - look at the logs under Print Results for details"
exit 1
else
echo "No errors found!"
fi