Showing 9 of 9 total issues
Method DockerExecutor.Execute
has 94 lines of code (exceeds 50 allowed). Consider refactoring. Open
func (e DockerExecutor) Execute(test TestCase) TestResult {
log.Printf("DOCKER_HOST: %s \n", os.Getenv("DOCKER_HOST"))
log.Printf("DOCKER_CERT_PATH: %s \n", os.Getenv("DOCKER_CERT_PATH"))
log.Printf("DOCKER_API_VERSION: %s \n", os.Getenv("DOCKER_API_VERSION"))
Method YAMLSuiteConf.convertToExpectedOut
has a Cognitive Complexity of 32 (exceeds 20 allowed). Consider refactoring. Open
func (y *YAMLSuiteConf) convertToExpectedOut(value interface{}) runtime.ExpectedOut {
exp := runtime.ExpectedOut{
JSON: make(map[string]string),
}
- Read upRead up
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 SSHExecutor.Execute
has 70 lines of code (exceeds 50 allowed). Consider refactoring. Open
func (e SSHExecutor) Execute(test TestCase) TestResult {
if test.Command.InheritEnv {
panic("Inherit env is not supported viá SSH")
}
Method YAMLSuiteConf.convertToExpectedOut
has 62 lines of code (exceeds 50 allowed). Consider refactoring. Open
func (y *YAMLSuiteConf) convertToExpectedOut(value interface{}) runtime.ExpectedOut {
exp := runtime.ExpectedOut{
JSON: make(map[string]string),
}
Function validateExpectedOut
has 52 lines of code (exceeds 50 allowed). Consider refactoring. Open
func validateExpectedOut(got string, expected ExpectedOut) matcher.MatcherResult {
var m matcher.Matcher
var result matcher.MatcherResult
result.Success = true
Function validateExpectedOut
has a Cognitive Complexity of 24 (exceeds 20 allowed). Consider refactoring. Open
func validateExpectedOut(got string, expected ExpectedOut) matcher.MatcherResult {
var m matcher.Matcher
var result matcher.MatcherResult
result.Success = true
- Read upRead up
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 Runner.Run
has a Cognitive Complexity of 24 (exceeds 20 allowed). Consider refactoring. Open
func (r *Runner) Run(tests []TestCase) <-chan TestResult {
in := make(chan TestCase)
out := make(chan TestResult)
go func(tests []TestCase) {
- Read upRead up
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
Function validateExpectedOut
has 9 return statements (exceeds 4 allowed). Open
func validateExpectedOut(got string, expected ExpectedOut) matcher.MatcherResult {
var m matcher.Matcher
var result matcher.MatcherResult
result.Success = true
Method DockerExecutor.Execute
has 5 return statements (exceeds 4 allowed). Open
func (e DockerExecutor) Execute(test TestCase) TestResult {
log.Printf("DOCKER_HOST: %s \n", os.Getenv("DOCKER_HOST"))
log.Printf("DOCKER_CERT_PATH: %s \n", os.Getenv("DOCKER_CERT_PATH"))
log.Printf("DOCKER_API_VERSION: %s \n", os.Getenv("DOCKER_API_VERSION"))