janritter/kvb-api

View on GitHub
adapters/stationmapper.go

Summary

Maintainability
A
0 mins
Test Coverage

Function getStationIDForName has 1007 lines of code (exceeds 50 allowed). Consider refactoring.
Wontfix

func getStationIDForName(ctx context.Context, name string) int {
    _, span := otel.Tracer("kvb-api").Start(ctx, "getStationIDForName")
    defer span.End()

    var m = make(map[string]int)
Severity: Major
Found in adapters/stationmapper.go - About 4 days to fix

    File stationmapper.go has 1959 lines of code (exceeds 500 allowed). Consider refactoring.
    Wontfix

    package adapters
    
    import (
        "context"
        "errors"
    Severity: Major
    Found in adapters/stationmapper.go - About 4 days to fix

      Function findClosestMatchingStation has 923 lines of code (exceeds 50 allowed). Consider refactoring.
      Wontfix

      func findClosestMatchingStation(ctx context.Context, name string) (string, error) {
          _, span := otel.Tracer("kvb-api").Start(ctx, "findClosestMatchingStation")
          defer span.End()
      
          wordsToTest := []string{"Aachener Str./Gürtel",
      Severity: Major
      Found in adapters/stationmapper.go - About 4 days to fix

        There are no issues that match your filters.

        Category
        Status