davidmigloz/go-bees

View on GitHub
app/src/main/java/com/davidmiguel/gobees/monitoring/MonitoringService.java

Summary

Maintainability
B
6 hrs
Test Coverage

MonitoringService has 21 methods (exceeds 20 allowed). Consider refactoring.
Open

@SuppressWarnings("deprecation")
public class MonitoringService extends Service implements AndroidCameraListener {

    // Intent argument
    public static final String ARGUMENT_MON_SETTINGS = "MONITORING_SETTINGS";

    File MonitoringService.java has 256 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /*
     * GoBees
     * Copyright (c) 2016 - 2017 David Miguel Lozano
     *
     * This program is free software: you can redistribute it and/or modify

      Method onStartCommand has 42 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          @Override
          public int onStartCommand(Intent intent, int flags, int startId) {
              super.onStartCommand(intent, flags, startId);
      
              // START action

        Method onStartCommand has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
        Open

            @Override
            public int onStartCommand(Intent intent, int flags, int startId) {
                super.onStartCommand(intent, flags, startId);
        
                // START action

        Cognitive Complexity

        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

        A method's cognitive complexity is based on a few simple rules:

        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
        • Code is considered more complex for each "break in the linear flow of the code"
        • Code is considered more complex when "flow breaking structures are nested"

        Further reading

        Parameter name 'c' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9]*$'.
        Open

                MonitoringService getService(SaveRecordingCallback c) {

        Checks that method parameter names conform to a specified pattern.By using accessModifiers property it is possibleto specify different formats for methods at different visibility levels.

        To validate catch parameters please useCatchParameterName.

        To validate lambda parameters please useLambdaParameterName.

        This documentation is written and maintained by the Checkstyle community and is covered under the same license as the Checkstyle project.

        Local variable name 'pMonitoringIntent' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9]*$'.
        Open

                PendingIntent pMonitoringIntent = PendingIntent.getActivity(this, 0,

        Checks that local, non-final variable names conform to a specified pattern.A catch parameter is considered to be a local variable.

        This documentation is written and maintained by the Checkstyle community and is covered under the same license as the Checkstyle project.

        There are no issues that match your filters.

        Category
        Status