TheAlgorithms-C/.github/workflows/clang-format.yml
Workflow config file is invalid. Please check your config file: yaml: line 24: mapping values are not allowed in this context
2020-05-29 16:06:01 -04:00

31 lines
851 B
YAML

name: Code Formatting
on: [push]
# push:
# branches: [ master ]
# pull_request:
# branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: requirements
run: |
sudo apt -qq -y update
sudo apt -qq install clang-format
- uses: actions/checkout@master
with:
submodules: true
- name: Formatter
run: find -name '*.c' -o -name '*.h' | \
xargs clang-format -i -style="$line1 $line2 $line3 $line4'
env:
- line1='{ BasedOnStyle: LLVM, UseTab: Never,'
- line2='IndentWidth: 4, TabWidth: 4, BreakBeforeBraces: Allman,'
- line3='AllowShortIfStatementsOnASingleLine: false, IndentCaseLabels: false,'
- line4='ColumnLimit: 80, AccessModifierOffset: -4 }'
- name: test
run: git diff