From b70e1bf34a63e1a522c0c2afce4928eae31c5ed5 Mon Sep 17 00:00:00 2001 From: RGBCube Date: Sat, 19 Nov 2022 19:16:34 +0300 Subject: [PATCH] Add format workflow & break some formatting --- .github/workflows/format.yml | 30 ++++++++++++++++++++++++++++++ color/paintbrush.v | 4 ++-- 2 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/format.yml diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml new file mode 100644 index 0000000..7324820 --- /dev/null +++ b/.github/workflows/format.yml @@ -0,0 +1,30 @@ + +name: Format Code + +on: + - pull_request + - push + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout Repository + uses: actions/checkout@v3 + + - name: Set Up V + uses: vlang/setup-v@v1.1 + with: + check-latest: true + + - name: Format Code + run: v fmt -w . + + - name: Push To GitHub + continue-on-error: true + run: | + git pull + git add ./ + git commit --amend + git push diff --git a/color/paintbrush.v b/color/paintbrush.v index c540254..b37d906 100644 --- a/color/paintbrush.v +++ b/color/paintbrush.v @@ -12,8 +12,8 @@ __global: [params] pub struct BrushParams { - fg ?Color - bg ?Color + fg ?Color + bg ?Color style []Style disabled bool }