Showing 9 of 51 total issues
Function TestTableGeneration
has 98 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func TestTableGeneration(t *testing.T) {
tcs := []struct {
name string
table *Table
expected string
Function TestApplyViaAhaLargeSystemWithErrors
has 59 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func TestApplyViaAhaLargeSystemWithErrors(t *testing.T) {
applier := NewApplier(&fritzAlwaysError{})
err := applier.Apply(
&Plan{
Switches: []Switch{
Function TestApplyViaAhaLargeSystem
has 59 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func TestApplyViaAhaLargeSystem(t *testing.T) {
applier := NewApplier(&fritzAlwaysSuccess{})
err := applier.Apply(
&Plan{
Switches: []Switch{
Function TestScatterGatherMixedResults
has 11 return statements (exceeds 4 allowed). Open
Open
func TestScatterGatherMixedResults(t *testing.T) {
work := map[string]func() (string, error){
"1": func() (string, error) { return "1 says OK", nil },
"2": func() (string, error) { return "", errors.New("2 says not ok") },
Function TestScatterGatherAllNotOk
has 11 return statements (exceeds 4 allowed). Open
Open
func TestScatterGatherAllNotOk(t *testing.T) {
work := map[string]func() (string, error){
"1": func() (string, error) { return "", errors.New("1 says not ok") },
"2": func() (string, error) { return "", errors.New("2 says not ok") },
Function TestCommands
has 52 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func TestCommands(t *testing.T) {
oldPlaces := defaultConfigPlaces
defer func() { defaultConfigPlaces = oldPlaces }()
defaultConfigPlaces = append([]config.Place{config.InDir("../testdata/config", "config_localhost_http_test.json", config.JSON())}, defaultConfigPlaces...)
Function TestScatterGatherAllOk
has 10 return statements (exceeds 4 allowed). Open
Open
func TestScatterGatherAllOk(t *testing.T) {
work := map[string]func() (string, error){
"1": func() (string, error) { return "1 says OK", nil },
"2": func() (string, error) { return "2 says OK", nil },
Function TestDeviceFiltering
has 6 return statements (exceeds 4 allowed). Open
Open
func TestDeviceFiltering(t *testing.T) {
for _, tc := range []struct {
name string
xmlfile string
filter func(Devicelist) []Device
Method cliConfigurer.Obtain
has 5 return statements (exceeds 4 allowed). Open
Open
func (iCLI *cliConfigurer) Obtain(r io.Reader) (ExtendedConfig, error) {
f := ""
c := Config{}
err := proceedUntilFirstError(
func() (err error) {