Skip to content

User updates and cpm

Tim van der Horst requested to merge user-updates-and-cpm into development

Description

Add endpoint to update users and fix CPM report generation.

Changes

  • Add ability to update user's authorities to DatabaseConnection
  • Create update user endpoint
  • Add nullable tip field to passing script default scripts
  • fix cpm endpoints

Additions

  • Add identity field to SubmissionController "GET /api/v1/assignment/{aid}/submission" endpoint
  • Add CPM report generator

Example report: Tip

A large method might indicate that it contains too much logic, this can be solved by placing part of the logic in a seperate method.

This applies to: - Method - main(String[] args) - Method - read(Scanner sc)

Tip
A high cyclomatic complexity has a higher chance of containting bugs than code that has a lower complexity. It als makes the code less maintainable and testable. Try to refactor parts of the logic from the highly complex code to a new method.

This applies to: - Method - housesAskedFor(int price, char a, String SORR, boolean availibleNow) - Method - getEnergyEfficiency(int rooms) - Method - main(String[] args) - Method - read(Scanner sc)

Failures
Method - housesAskedFor(int price, char a, String SORR, boolean availibleNow)
- has too high cyclomatic complexity:14 > 10
Method - main(String[] args)
- has too high cyclomatic complexity:27 > 10
Method - read(Scanner sc)
- has too high cyclomatic complexity:12 > 10
Warnings
Method - getEnergyEfficiency(int rooms)
- has high cyclomatic complexity:9 > 7

(but with more colour)

Test and Review

To be filled in by the reviewers

  • All of the methods are commented to expectation

  • The methods are tested to satisfaction

  • There are no unnecessary files present in the MR

  • The continuous integration has no problems with the MR

  • The MR is filled in as requested (including labels, milestones, and reviewers)

  • The documentation is up-to-date

  • All nullable parameters are marked as such

Edited by Luc Everse

Merge request reports

Loading