Checkstyle MethodLength in Serverapp #98

Closed
opened 2026-04-11 18:42:39 +02:00 by jona.walpert · 4 comments
jona.walpert commented 2026-04-11 18:42:39 +02:00 (Migrated from git.scicore.unibas.ch)

Bug Report

Environment

  • Branch & Commit: any
  • Operating system: Windows 25h2
  • How was execution started (Gradle task / IDE debug / IDE run): Gradle Task checkstyle
  • Java version: 25
  • Gradle version: 9.3.1

Summary

Checkstyle termiantes with a MeethodLine error in the serverapp `RegisterCommands` function. This function cant be shortened as all available commands need to be registered in that single function

Expected Behavior

Checkstyle should complete with a sucess response

Actual Behavior

Checkstyle terminaes with an error response

Steps to Reproduce

./gradlew.bat check

Stack Trace / Error Message

[ant:checkstyle] [ERROR] PATHTOFOLDER\src\main\java\ch\unibas\dmi\dbis\cs108\casono\server\ServerApp.java:103:5: Methode registerCommands ist 73 Zeilen lang (Obergrenze ist 60). [MethodLength]

Possible Cause / Notes

could be fixed by exempting serverApp.java from cehckstyle

Checklist

  • I reproduced the problem using the steps above
  • I searched documentation for relevant information
  • I added relevant labels
## Bug Report <!--The reccommended type is: Issue--> ### Environment - **Branch & Commit: any** - **Operating system: Windows 25h2** - **How was execution started (Gradle task / IDE debug / IDE run): Gradle Task checkstyle** - **Java version:** `25` - **Gradle version**: `9.3.1` ### Summary Checkstyle termiantes with a MeethodLine error in the serverapp \`RegisterCommands\` function. This function cant be shortened as all available commands need to be registered in that single function ### Expected Behavior Checkstyle should complete with a sucess response ### Actual Behavior Checkstyle terminaes with an error response ### Steps to Reproduce ./gradlew.bat check ### Stack Trace / Error Message ``` [ant:checkstyle] [ERROR] PATHTOFOLDER\src\main\java\ch\unibas\dmi\dbis\cs108\casono\server\ServerApp.java:103:5: Methode registerCommands ist 73 Zeilen lang (Obergrenze ist 60). [MethodLength] ``` ### Possible Cause / Notes could be fixed by exempting `serverApp.java` from cehckstyle ### Checklist - [x] I reproduced the problem using the steps above - [x] I searched documentation for relevant information - [x] I added relevant labels
jona.walpert commented 2026-04-11 18:42:39 +02:00 (Migrated from git.scicore.unibas.ch)

assigned to @lars.winzer

assigned to @lars.winzer
lars.winzer commented 2026-04-11 18:44:43 +02:00 (Migrated from git.scicore.unibas.ch)

created branch feat/98-checkstyle-methodlength-in-serverapp to address this issue

created branch [`feat/98-checkstyle-methodlength-in-serverapp`](/cs108-fs26/Gruppe-13/-/compare/main...feat%2F98-checkstyle-methodlength-in-serverapp) to address this issue
lars.winzer commented 2026-04-11 18:47:45 +02:00 (Migrated from git.scicore.unibas.ch)

mentioned in merge request !101

mentioned in merge request !101
lars.winzer commented 2026-04-11 18:49:32 +02:00 (Migrated from git.scicore.unibas.ch)

mentioned in commit 15ab6faf2e

mentioned in commit 15ab6faf2e3ec55ad2afe66f1d401005f4f2f75b
lars.winzer (Migrated from git.scicore.unibas.ch) closed this issue 2026-04-11 18:49:33 +02:00
This repo is archived. You cannot comment on issues.
1 Participants
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: University-of-Basel-Studentprojects/Programmierprojekt#98