Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 17 additions & 3 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@
"type": "npm",
"script": "compile",
"isBackground": true,
"problemMatcher": [
"$tsc-watch"
],
"problemMatcher": ["$tsc-watch"],
"group": {
"kind": "build",
"isDefault": true
Expand All @@ -34,6 +32,22 @@
"script": "preTestJediLSP",
"problemMatcher": [],
"label": "preTestJediLSP"
},
{
"label": "Run checkPR.sh",
"type": "shell",
"command": "${workspaceFolder}/scripts/checkPR.sh",
"group": {
"kind": "build",
"isDefault": false
},
"problemMatcher": [],
"presentation": {
"echo": true,
"reveal": "always",
"focus": false,
"panel": "shared"
}
}
]
}
40 changes: 40 additions & 0 deletions scripts/checkPR.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#!/bin/bash

# Function to run a command and check its status
run_command() {
echo "Running: '$1'"
echo "----------------------------------------"
$1
if [ $? -ne 0 ]; then
echo "FAILURE: '$1'"
exit 1
else
echo "----------------------------------------"
echo "SUCCESS: '$1'"
echo "----------------------------------------"
fi
}

# Check dependencies
run_command "npm run checkDependencies"

# Run linter
run_command "npm run lint"

# Check formatting
run_command "npm run format-check"

# Activate the virtual environment
source ".venv/bin/activate"

# Change directory to python_files
cd python_files || exit

# Run Pyright
run_command "python -m pyright"

# Run Ruff
run_command "python -m ruff ."
echo "----------------------------------------"
echo "----------------------------------------"
echo "All checks passed successfully!"
Loading