Skip to content

verbose option to include the commit change history of the parent container when tracking a variable (or statement) #15

@tsantalis

Description

@tsantalis

@jodavimehran
It would be nice to have a verbose option in the builder
that will include the change history of the parent method declaration when tracking a variable.

VariableTracker variableTracker = CodeTracker.variableTracker()
            .repository(repository)
            .filePath("src/main/java/com/puppycrawl/tools/checkstyle/Checker.java")
            .startCommitId("119fd4fb33bef9f5c66fc950396669af842c21a3")
            .methodName("fireErrors")
            .methodDeclarationLineNumber(384)
            .variableName("stripped")
            .variableDeclarationLineNumber(385)
            .verbose()
            .build();

Currently, there may exist a lot of major relocation changes for the parent method declaration (e.g., move to another file, rename/moved of the method's type declaration), which are not shown to the API user.
In this example, the container Checker of method fireErrors is affected by a Move Source Folder refactoring, before the variable is introduced.

Commit ID: f1efb27670a93690577f1bae17fc9dcbd88a795d
Date: 2014-03-04T17:18:11
Before: src/checkstyle/com.puppycrawl.tools.checkstyle.Checker#fireErrors(String, SortedSet)
After: src/main/java/com.puppycrawl.tools.checkstyle.Checker#fireErrors(String, SortedSet)
container change: Move Source Folder src/checkstyle to src/main/java

Metadata

Metadata

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions