mirror of
https://github.com/LunarVim/LunarVim.git
synced 2024-09-21 02:55:09 +02:00
44 lines
1,023 B
YAML
44 lines
1,023 B
YAML
name: format
|
|
on:
|
|
push:
|
|
branches: '**'
|
|
pull_request:
|
|
branches:
|
|
- 'master'
|
|
- 'rolling'
|
|
|
|
jobs:
|
|
stylua-check:
|
|
name: "Formatting check with Stylua"
|
|
runs-on: ubuntu-20.04
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Prepare dependencies
|
|
run: |
|
|
sudo apt install -y curl unzip --no-install-recommends
|
|
bash ./utils/installer/install_stylua.sh
|
|
|
|
- name: Check formatting
|
|
run: |
|
|
./utils/stylua --config-path .stylua.toml -c .
|
|
shfmt-check:
|
|
name: "Formatting check with shfmt"
|
|
runs-on: ubuntu-20.04
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Setup Go
|
|
uses: actions/setup-go@v2
|
|
with:
|
|
go-version: '1.16'
|
|
|
|
- name: Use shfmt
|
|
run: |
|
|
GO111MODULE=on go get mvdan.cc/sh/v3/cmd/shfmt
|
|
|
|
# https://google.github.io/styleguide/shellguide.html
|
|
- name: Check formatting
|
|
run: |
|
|
shfmt -f . | grep -v jdtls | xargs shfmt -i 2 -ci -l -d
|
|
|