Closed chloehumphrey closed 4 weeks ago
Output
Bugs
Note:
It now runs if you try it in Powershell
Bugs:
List of 5-10 Bugs in the Repository Here are some bugs and potential issues based on reviewing the code:
Errors(These are most likely because I tried running the program on Mac):
Cross-Platform Incompatibility:
cross-env
.Cannot Find Compiled JavaScript Modules (MODULE_NOT_FOUND
):
Cannot find module
errors after running npm run build
. This indicates that TypeScript files are not compiling correctly into JavaScript or that the output directory is incorrect. Double-check tsconfig.json
to ensure that the output files are generated in the correct location.Missing Environment Variables (GitHub Token):
GITHUB_TOKEN
to run. Without this token, the tests crash, calling process.exit(1)
. The tests should handle this case more gracefully by alerting the user to the missing token, rather than exiting abruptly.Outdated Dependencies:
inflight
and glob
are deprecated. This introduces the risk of security vulnerabilities and memory leaks. These libraries should be updated or replaced with more modern alternatives.Jest Test Failures (BusFactor.test.ts
and RampUpMetric.test.ts
):
Expected: > 0, Received: 0
, indicating that the metric calculations (e.g., BusFactor) are returning unexpected results. This could be due to the tests relying on live API data from GitHub, which may be incomplete or incorrect during testing.Hardcoded GitHub API Data:
Inconsistent Script Names in package.json
:
package.json
scripts have some inconsistencies in their naming conventions (e.g., start-CorrectnessMetric
vs start-CorrectnessMetrics
). This can cause confusion when running scripts and should be standardized.Missing Error Handling:
Improper Logging Configuration:
Logger.ts
could be enhanced with better separation of log levels (info, error, debug) to allow for easier debugging during development.File Permissions for run
Script:
run
script lacks the proper executable permissions. Running chmod +x ./run
resolves this, but this could be avoided by using cross-platform solutions for script execution.
I've updated the README with steps to execute the program. This ONLY works using Windows Command Prompt (not PowerShell, bash, or any variation of Linux/Mac). If you're on Mac, you can't run it right now. Just look through the code to find bugs.