refactor

package
v1.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 19, 2018 License: GPL-3.0, GPL-3.0 Imports: 13 Imported by: 0

Documentation

Overview

   Given old and new step gives the filenames of specification, concepts and files in code changed.

   Refactoring Flow:
	- Refactor specs and concepts in memory
	- Checks if it is a concept or not
	- In case of concept - writes to file and skips the runner
	- If its not a concept (its a step) - need to know the text, so makes a call to runner to get the text(step name)
	- Refactors the text(changes param positions ect) and sends it to runner to refactor implementations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetRefactoringChanges added in v0.9.8

func GetRefactoringChanges(oldStep, newStep string, runner runner.Runner, specDirs []string) *refactoringResult

GetRefactoringChanges given an old step and new step gives the list of steps that need to be changed to perform refactoring. It also provides the changes to be made on the implementation files.

func PerformRephraseRefactoring

func PerformRephraseRefactoring(oldStep, newStep string, startChan *runner.StartChannels, specDirs []string) *refactoringResult

PerformRephraseRefactoring given an old step and new step refactors specs and concepts in memory and if its a concept writes to file else invokes runner to get the step name and refactors the step and sends it to runner to refactor implementation.

func RefactorSteps

func RefactorSteps(oldStep, newStep string, startChan *runner.StartChannels, specDirs []string)

RefactorSteps performs rephrase refactoring and prints the refactoring summary which includes errors and warnings generated during refactoring and files changed during refactoring : specification files, concept files and the implementation files changed.

func SliceIndex

func SliceIndex(limit int, predicate func(i int) bool) int

SliceIndex gives the index of the args.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL