Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Technical debt not showing anything with version 1.0 #21

Open
benedictbasa opened this issue May 15, 2018 · 16 comments
Open

Technical debt not showing anything with version 1.0 #21

benedictbasa opened this issue May 15, 2018 · 16 comments

Comments

@benedictbasa
Copy link

I have used version 0.1 a few months ago and when I switched to version 1.0 today, the technical debt in terms of effort is not showing properly. Any thoughts?

@dewanst
Copy link
Contributor

dewanst commented May 16, 2018

Could you tell us which version of SQ you are using?

@benedictbasa
Copy link
Author

Nice to hear from you. I am using SQ 6.7.2 and then I upgraded to 6.7.3, both are not working.

@dewanst
Copy link
Contributor

dewanst commented May 16, 2018

Could you provide me with some numbers, what you are seeing and what you are expecting?

@benedictbasa
Copy link
Author

Previously on version 0.1 the technical debt on average with one project can be from 30 mins to a few days. I think with version 0.1 there is alot of duplicated analysis of the same issue. With version 1.0 there is code smells but the technical debt is always 0.

@benedictbasa
Copy link
Author

For example with using version 1, we have 1 project with 75 code smells, minor ones such as comments needed and disabled code. However the technical debt is showing 0.

@benedictbasa
Copy link
Author

and btw I am using maven to do the code analysis. one package becomes one project in SQ

@benedictbasa
Copy link
Author

benedictbasa commented May 16, 2018

This is a project and its analysis dashboard, it is not showing any technical debt eventhough the codesmell shows 77 items.

image

@dewanst
Copy link
Contributor

dewanst commented May 17, 2018

Hi
I'm working on a solution. I'll keep you posted.

@benedictbasa
Copy link
Author

thanks alot :)

@dewanst
Copy link
Contributor

dewanst commented Jun 19, 2018

Hi

Please take a look at branch dev03_refactor. It should address this issue. We will create a release in the upcoming weeks.

@benedictbasa
Copy link
Author

Thanks :) I will check and give that a try

@benedictbasa
Copy link
Author

I tried compiling the branch dev03_refactor, however it has some errors/conflicts like these in some files (4 of them, 1 test).

package be.i8c.codequality.sonar.plugins.sag.webmethods.flow.metric;
NodeFileMetrics.java

<<<<<<< HEAD
import java.util.Objects;

import com.sonar.sslr.api.AstNode;

import be.i8c.codequality.sonar.plugins.sag.webmethods.flow.visitor.NodeMetricsVisitor;
import be.i8c.codequality.sonar.plugins.sag.webmethods.flow.visitor.NodeVisitorContext;

public class NodeFileMetrics {

private final NodeMetricsVisitor fileLinesVisitor = new NodeMetricsVisitor();

/**

  • Creates a FlowFileMetrics Object, which contains metrics that are linked with this file. It
  • contains metrics that can be evaluated by inspecting the AST tree or by scanning the file.
  • Scanning the file is used when more complex compositions are needed to calculate a metric.
  • @param context
    */
    public NodeFileMetrics(NodeVisitorContext context) {
    AstNode rootTree = context.rootTree();
    Objects.requireNonNull(rootTree, "Cannot compute metrics without a root tree");
    fileLinesVisitor.scanFile(context);
    }
    =======

package be.i8c.codequality.sonar.plugins.sag.webmethods.flow.visitor
FlowMetricsVisitor.java

<<<<<<< HEAD
}
if(dependenciesSubscr.contains(astNode.getType())) {

}else if(dependenciesSubscr.contains(astNode.getType())) {

refs/remotes/origin/dev03_refactor
checkDependency(astNode);

package be.i8c.codequality.sonar.plugins.sag.webmethods.flow
FlowSquidSensor.java

<<<<<<< HEAD
fileSystem.inputFiles(nodePredicate).forEach(nodeFiles::add);

fileSystem.inputFiles(nodePredicate).forEach(flowFiles::add);

refs/remotes/origin/dev03_refactor

package be.i8c.codequality.sonar.plugins.sag.webmethods.flow.metric;
FlowMetrics.java

<<<<<<< HEAD
private static final String DOMAIN = "i8c-Flow-plugin";

private static final String DOMAIN = "i8C-Flow-plugin";

refs/remotes/origin/dev03_refactor

package be.i8c.codequality.sonar.plugins.sag.webmethods.flow.visitor;
FlowMetricsVisitorTest.java

<<<<<<< HEAD
dependencies.put(195,"pub.flow:clearPipeline");
dependencies.put(726,"fram.admin.ama.utilities:buildAssetState");
dependencies.put(471,"pub.flow:clearPipeline");
dependencies.put(969,"pub.flow:clearPipeline");
dependencies.put(714,"pub.art.connection:queryConnectionState");

refs/remotes/origin/dev03_refactor

[ERROR] sonar-flow-plugin/sonar-flow-plugin/src/test/java/be/i8c/codequality/sonar/plugins/sag/webmethods/flow/visitor/NodeMetricsVerifier.java:[24,51] incompatible types: be.i8c.codequality.sonar.plugins.sag.webmethods.flow.visitor.NodeVisitorContext cannot be converted to be.i8c.codequality.sonar.plugins.sag.webmethods.flow.visitor.FlowVisitorContext

@benedictbasa
Copy link
Author

After trying to modify the code myself to get it to compile and build am also getting these errors in parsing.

[ERROR] Unable to parse file: xx/xx/xx/node.ndf
[ERROR] Parse error at line 3 column 0:

--> Valuesversion2.0
4: valuesvc_type
5: flow valuevaluesvc_subtype
6: default valuevaluesvc_sigtype
7: java 3.5 valuerecordrecordjavaclasscom.wm.util.Values
8: recordrecordjavaclasscom.wm.util.Values
9: valuenode_type
10:
11:
12: record valuevalueis_public
13: false

@dewanst
Copy link
Contributor

dewanst commented Jul 3, 2018

@benedictbasa
I've fixed the merge messages, could you retry?

@benedictbasa
Copy link
Author

It is fixed and compiles properly now.

Just one question though, some of the rules are disabled after.

image

@benedictbasa
Copy link
Author

Should be fine now, i just created my own quality profile.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants