Skip to content

Commit

Permalink
Adding naming convention ci
Browse files Browse the repository at this point in the history
  • Loading branch information
dmick92 committed Jan 15, 2024
1 parent 4a0628d commit 80a8c19
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/namingConvention.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Verify File Naming Convention

on:
push:
paths:
- "**/*" # Trigger the workflow on any file change

jobs:
verifyFileNaming:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Verify file names
run: |
for file in $(git diff --name-only HEAD^); do
if [[ $file != *.* ]]; then
# Check if the file name is in camel case
if [[ $file =~ ^[a-z]+([A-Z][a-z0-9]+)*([A-Z])?$ ]]; then
echo "File $file has a valid name."
else
echo "File $file does not have a valid name (camel case required)."
exit 1
fi
fi
done

0 comments on commit 80a8c19

Please sign in to comment.