cs-450-project / se-phase2

Phase 2 project handoff
0 stars 0 forks source link

Clone Phase 2 repository and make a list of bugs. #1

Closed chloehumphrey closed 4 weeks ago

chloehumphrey commented 1 month ago

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.

chloehumphrey commented 1 month ago

Bugs

YaminiKrubha commented 1 month ago
  1. In URLParser.ts, the error handling logs an error message but does not throw or return the error.
  2. Some of the tests lack proper setup or teardown, which leads to inconsistent results.
  3. The current test suite lacks coverage for edge cases, such as invalid URLs or network errors, which could lead to undetected bugs.
  4. In Responsivemaintainers.ts, the logic for calculating date differences could be consolidated to reduce redundancy.
  5. Jest coverage are not met because test suite lacks sufficient tests to execute all statements, branches, lines, and functions.
WillKissel02 commented 1 month ago

Output

image

Bugs

  1. testingRepo folder is never deleted after clone
  2. rampScore calculation just checks for a bunch of readme headings in a very inefficient stack of if statements
  3. RepoClone contains ramp score calculation, perhaps the class should be renamed or split
  4. cloneRepository has no logging on successful runs
  5. analyzeReadme has no logging or error handling
jtwellsp commented 1 month ago

Screenshot 2024-10-15 213148

Note:

It now runs if you try it in Powershell

Bugs:

  1. Does not run in WSL and also does not support Linux running because of the node out format
  2. License metric is does not work properly and displays 0 even if it has the license
  3. Netscore has rounding issues that would cause it to fail autograder
  4. The jest, test files don't have full line coverage
  5. Autograder does not even run for this program
adhabib commented 1 month ago
Ca3de commented 1 month ago
Screenshot 2024-10-16 at 3 42 50 PM Screenshot 2024-10-16 at 3 42 46 PM Screenshot 2024-10-16 at 3 42 40 PM 1 Screenshot 2024-10-16 at 3 42 40 PM Screenshot 2024-10-16 at 3 42 33 PM

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):

  1. Cross-Platform Incompatibility:

    • The project is specifically designed to work in Windows Command Prompt, making it incompatible with PowerShell, Linux, or macOS environments. This limits the usability of the project and could be addressed by writing platform-agnostic scripts or using tools like cross-env.
  2. Cannot Find Compiled JavaScript Modules (MODULE_NOT_FOUND):

    • The project frequently encounters 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.
  3. Missing Environment Variables (GitHub Token):

    • Several tests require a 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.
  4. Outdated Dependencies:

    • Some dependencies like 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.
  5. Jest Test Failures (BusFactor.test.ts and RampUpMetric.test.ts):

    • The Jest tests are failing with errors like 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.
  6. Hardcoded GitHub API Data:

    • The tests rely on real-time GitHub API data, which can be unreliable due to API limits or data inconsistencies. This can cause test failures. Consider mocking API responses to ensure consistent test results.
  7. Inconsistent Script Names in package.json:

    • The 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.
  8. Missing Error Handling:

    • Some functions exit the process abruptly when encountering an error (e.g., missing GitHub token). Adding more robust error handling with meaningful messages could improve the user experience.
  9. Improper Logging Configuration:

    • The logging configuration in Logger.ts could be enhanced with better separation of log levels (info, error, debug) to allow for easier debugging during development.
  10. File Permissions for run Script:

    • On non-Windows systems, the 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.