Skip to content

Modify plugins to adhere to new include structure #57

Modify plugins to adhere to new include structure

Modify plugins to adhere to new include structure #57

Workflow file for this run

name: MetaCG Lint
on:
push:
pull_request:
jobs:
cmake-lint:
runs-on: ubuntu-latest
steps:
- name: Install lint tool in container
run: |
python3 -m pip install cmakelang
- uses: actions/checkout@v6
with:
fetch-depth: 2
- name: Changed Files
id: changed-files
uses: tj-actions/changed-files@e0021407031f5be11a464abee9a0776171c79891 # v47.0.1
with:
separator: " "
skip_initial_fetch: true
base_sha: 'HEAD~1'
sha: 'HEAD'
- name: List changed files
env:
CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
run: |
echo "Changed files:"
echo "${CHANGED_FILES}"
- name: CMake Lint
env:
CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
run: |
for f in ${CHANGED_FILES}; do
filename=$(basename $f)
if [[ $filename == *.cmake ]]; then
echo "Running on $f"
cmake-format --check $f
elif [[ $filename == "CMakeLists.txt" ]]; then
echo "Running on $f"
cmake-format --check $f
fi
done