Showing 24 of 61 total issues
Function parseMatrixPython
has 5 return statements (exceeds 4 allowed). Open
Open
func parseMatrixPython(v interface{}) (version string, c TestCase, err error) {
m, ok := v.(map[interface{}]interface{})
if !ok {
err = fmt.Errorf("Given item is broken.")
Function Build
has 5 return statements (exceeds 4 allowed). Open
Open
func Build(ctx context.Context, dir, tag, version string, noCache bool, output io.Writer) (err error) {
// Create a docker client.
cli, err := client.NewEnvClient()
if err != nil {
Function TestGoArgumentSetWithFullDescriptions
has a Cognitive Complexity of 21 (exceeds 20 allowed). Consider refactoring. Open
Open
func TestGoArgumentSetWithFullDescriptions(t *testing.T) {
travis, err := storeAndLoadTravis(&Travis{
Language: "go",
Go: []string{"1.6", "1.7"},
- 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 TestPythonArgumentSetWithFullDescriptions
has a Cognitive Complexity of 21 (exceeds 20 allowed). Consider refactoring. Open
Open
func TestPythonArgumentSetWithFullDescriptions(t *testing.T) {
travis, err := storeAndLoadTravis(&Travis{
Language: "python",
Python: []string{"2.7", "3.5"},
- 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"