indykite / neo4j-graph-tool-core

Function with cyclomatic complexity higher than threshold GO-R1005
Anti-pattern
Minor
4 months ago4 months old
func update has a cyclomatic complexity of 17 with "high" risk
366}
367
368// update set Updating state in the beginning, but not at the end.
369func (w *Neo4jWrapper) update(370	targetVersion *migrator.TargetVersion,
371	dryRun, clean bool,
372	batchName migrator.Batch,
func queryVersion has a cyclomatic complexity of 16 with "high" risk
 66	return dbModel, nil
 67}
 68
 69func queryVersion( 70	ctx context.Context,
 71	session neo4j.SessionWithContext,
 72	cypher string,
func addSnapshotsTo has a cyclomatic complexity of 16 with "high" risk
348	return localFolders, nil
349}
350
351func (s *Scanner) addSnapshotsTo(localFolders LocalFolders) error {352	dirPath := s.resolve(filepath.Clean("snapshots"))
353	f, err := os.Open(filepath.Clean(dirPath))
354	if err != nil {
func Plan has a cyclomatic complexity of 25 with "high" risk
 46}
 47
 48// Plan prepares execution plan with given builder.
 49func (p *Planner) Plan( 50	localFolders LocalFolders,
 51	dbModel DatabaseModel,
 52	targetVersion *TargetVersion,