Project

General

Profile

Task #10139

fix coding issues at *BenchTest classes

Added by Sergey Smolov about 1 month ago. Updated 29 days ago.

Status:
Verified
Priority:
High
Assignee:
Category:
Refactoring
Target version:
Start date:
03/02/2020
Due date:
% Done:

0%

Estimated time:
Detected in build:
master
Published in build:

Description

The following issues should be fixed at "*BenchTest" test classes:

  1. Substitute copy-pasted Javadoc header comments by relevant ones
  2. ru.ispras.retrascope.engine.cfg.extractor.iface.VhdlCfgExtractorIfaceBenchTest: parameter getStatistics is never used at runTest method - refactoring is needed
  3. There is a branch order for "if" operator that is used in the project. Following the rule, this form:
    if (cond) {
    ...
    } else {
    ..
    }
    

    is better than:
    if (!cond) {
    ...
    } else {
    ..
    }
    

    Take a look at "*BenchTest" classes to fix this rule's violations.
  4. Fix "Local variable 'argPaths' is redundant" warning that appears while opening ru.ispras.retrascope.engine.cfg.transformer.gadd.VerilogCfgGaddBenchTest class in IntelliJ IDEA. This warning also appears at other "*BenchTest" classes too. Other warnings that are produced by IntelliJ IDEA are also worth to be fixed.
  5. Having expressions like "!x.endsWith(y) && !x.endsWith(z) && !x.endsWith(w) && ..." you should rewrite them with single "!x.matches(..)" expression. Take a look at regular expressions in Java.

History

#1

Updated by Sergey Smolov about 1 month ago

CheckStyle violation is detected:

$ ./gradlew checkStyle

> Task :checkstyleTest
[ant:checkstyle] /home/ssedai/Downloads/retrascope/src/test/java/ru/ispras/retrascope/engine/cfg/extractor/iface/VhdlCfgExtractorIfaceBenchTest.java:61: warning: 'if' construct must use '{}'s.
Checkstyle rule violations were found. See the report at: file:///home/ssedai/Downloads/retrascope/build/reports/checkstyle/test.html
Checkstyle files with violations: 1
Checkstyle violations by severity: [warning:1]

#2

Updated by Maxim Chudnov 29 days ago

  • Status changed from New to Resolved
#3

Updated by Sergey Smolov 29 days ago

  • Status changed from Resolved to Verified

Also available in: Atom PDF