Update index.html #3
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Comment Check | |
on: | |
pull_request: | |
types: | |
- opened | |
- synchronize | |
- reopened | |
jobs: | |
check-comments: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 14 | |
- name: Change working directory | |
run: cd I426-UNESCO_Tracker | |
- name: Install dependencies | |
run: npm install | |
- name: Check for comments | |
run: | | |
# Assuming your code is in JavaScript files (modify the command accordingly) | |
# This command checks for lines that start with "//" or "/*" (JavaScript comments) | |
# Adjust the file extension as needed | |
if grep -rE '(\/\/|\/\*)' ./**/*.js; then | |
echo "Code contains comments. All good!" | |
else | |
echo "Code is not commented properly!" | |
exit 1 | |
fi |