Skip to content

Add nanorc files parsing in checks workflow #11

Add nanorc files parsing in checks workflow

Add nanorc files parsing in checks workflow #11

Workflow file for this run

name: Pull request checks
on:
pull_request:
branches:
- main
jobs:
check_nanorc_files:
name: Check nanorc files
runs-on: ubuntu-latest
steps:
- name: Checkout branch
uses: actions/checkout@v3
- name: Parse nanorc files
run: |
# see https://www.nano-editor.org/dist/latest/nano.html#Nanorc-Files
grep -v -E "^(#|syntax|header|magic|formatter|linter|comment|tabgives|color|icolor|include|extendsyntax|$)" *.nanorc && exit 1 || exit 0
- name: Run nano
shell: bash
run: |
nano --version
echo "include \"$(pwd)/*.nanorc\"" > ~/.nanorc
echo "" | nano 2> log.txt || grep "^Error" log.txt && exit 1 || exit 0