BinToss/Intern

View on GitHub
Tasks.cs

Summary

Maintainability
D
1 day
Test Coverage

Method DoTask has a Cognitive Complexity of 80 (exceeds 20 allowed). Consider refactoring.
Open

        public static void DoTask(Task task)
        {
            switch (task.Type)
            {
                case Type.FileSystemDelete:
Severity: Minor
Found in Tasks.cs - About 1 day to fix

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

Method DoTask has 97 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        public static void DoTask(Task task)
        {
            switch (task.Type)
            {
                case Type.FileSystemDelete:
Severity: Major
Found in Tasks.cs - About 3 hrs to fix

TODO found
Open

                    // TODO: Check these per parameter. We might be given a procID and a file
Severity: Minor
Found in Tasks.cs by fixme

TODO found
Open

                case Type.ComparePermissions: // TODO: What do I want from this?
Severity: Minor
Found in Tasks.cs by fixme

TODO found
Open

        /** TODO: Create template functions for each task. Result will resemble the System.Threading.Task namespace */
Severity: Minor
Found in Tasks.cs by fixme

TODO found
Open

                // TODO: try to close the handle(s) of the file; Employ
Severity: Minor
Found in Tasks.cs by fixme

TODO found
Open

                            // TODO: Compare RegKey ACLs; Difficulty: easier than processes
Severity: Minor
Found in Tasks.cs by fixme

TODO found
Open

                // TODO: determine if we can obtain permission to continue
Severity: Minor
Found in Tasks.cs by fixme

There are no issues that match your filters.

Category
Status