app/app.go
File app.go
has 530 lines of code (exceeds 500 allowed). Consider refactoring. Open
Open
package app
import (
"fmt"
"github.com/SUSE/saptune/sap"
App
has 24 methods (exceeds 20 allowed). Consider refactoring. Open
Open
type App struct {
SysconfigPrefix string
AllNotes map[string]note.Note // all notes
AllSolutions map[string]solution.Solution // all solutions
TuneForSolutions []string // list of solution names to tune, must always be sorted in ascending order.
Method App.TuneNote
has 53 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func (app *App) TuneNote(noteID string) error {
savConf := false
aNote, err := app.GetNoteByID(noteID)
if err != nil {
return err
Method App.TuneNote
has 9 return statements (exceeds 4 allowed). Open
Open
func (app *App) TuneNote(noteID string) error {
savConf := false
aNote, err := app.GetNoteByID(noteID)
if err != nil {
return err
Method App.RevertNote
has 5 return statements (exceeds 4 allowed). Open
Open
func (app *App) RevertNote(noteID string, permanent bool) error {
noteTemplate, err := app.GetNoteByID(noteID)
if err != nil {
// to revert an applied note even if the corresponding
Method App.RevertSolution
has 5 return statements (exceeds 4 allowed). Open
Open
func (app *App) RevertSolution(solName string) error {
sol, err := app.GetSolutionByName(solName)
if err != nil {
return err
}
Method App.VerifyNote
has 5 return statements (exceeds 4 allowed). Open
Open
func (app *App) VerifyNote(noteID string) (conforming bool, comparisons map[string]note.FieldComparison, valApplyList []string, err error) {
theNote, err := app.GetNoteByID(noteID)
if err != nil {
return
}
Method App.TuneSolution
has 5 return statements (exceeds 4 allowed). Open
Open
func (app *App) TuneSolution(solName string) (removedExplicitNotes []string, err error) {
removedExplicitNotes = make([]string, 0)
sol, err := app.GetSolutionByName(solName)
if err != nil {
return