Showing 185 of 185 total issues
BraceStyleListener
has 53 methods (exceeds 20 allowed). Consider refactoring. Open
public class BraceStyleListener extends SwiftBaseListener {
private Printer printer;
private BufferedTokenStream tokenStream;
File YamlConfigurationTest.java
has 384 lines of code (exceeds 250 allowed). Consider refactoring. Open
package com.sleekbyte.tailor.functional.yaml;
import static org.junit.Assert.assertArrayEquals;
import static org.junit.Assert.assertTrue;
Similar blocks of code found in 2 locations. Consider refactoring. Open
@Test
public void testPurge() throws IOException {
addExpectedMsg(12, 15,
Rules.TERMINATING_SEMICOLON,
Messages.STATEMENTS + Messages.SEMICOLON,
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 283.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
@Test
public void testCliAndConfigFilePrecedence() throws IOException {
addExpectedMsg(12, 15,
Rules.TERMINATING_SEMICOLON,
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 283.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
class CheckSuperLongClassName {
}
let checkElementNameLength: (ename: Int, veryLongElementName: Int) = (1, 2)
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 262.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
class Cl {
}
let checkElementNameLength: (ename: Int, veryLongElementName: Int) = (1, 2)
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 262.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
File FormatTest.java
has 340 lines of code (exceeds 250 allowed). Consider refactoring. Open
package com.sleekbyte.tailor.functional;
import static org.junit.Assert.assertArrayEquals;
import com.github.mustachejava.DefaultMustacheFactory;
File BraceStyleListener.java
has 332 lines of code (exceeds 250 allowed). Consider refactoring. Open
package com.sleekbyte.tailor.listeners;
import com.sleekbyte.tailor.antlr.SwiftBaseListener;
import com.sleekbyte.tailor.antlr.SwiftParser;
import com.sleekbyte.tailor.common.Location;
Method addAllExpectedMsgs
has 85 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Override
protected void addAllExpectedMsgs() {
// Type inheritance commas
int start = 9;
addExpectedCommaMessage(start, 24, Messages.NO_SPACE_BEFORE);
Method addAllExpectedMsgs
has 78 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Override
protected void addAllExpectedMsgs() {
// Colons in type annotations
int start = 1;
SourceFileUtilTest
has 26 methods (exceeds 20 allowed). Consider refactoring. Open
@RunWith(MockitoJUnitRunner.class)
public class SourceFileUtilTest {
@Rule
public TestName testName = new TestName();
CLIArgumentParser
has 26 methods (exceeds 20 allowed). Consider refactoring. Open
public final class CLIArgumentParser {
private Options options;
private CommandLine cmd;
Configuration
has 24 methods (exceeds 20 allowed). Consider refactoring. Open
public final class Configuration {
private static final String CONFIG_JSON = "../config.json";
private static final Path CODE_CLIMATE_CONFIG = Paths.get(CONFIG_JSON);
private static CLIArgumentParser CLIArgumentParser = new CLIArgumentParser();
Method addAllExpectedMsgs
has 66 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Override
protected void addAllExpectedMsgs() {
int start = 2;
addExpectedMsg(start, 1, Severity.WARNING, Messages.CLASS);
addExpectedMsg(start + 5, 5, Severity.WARNING, Messages.INITIALIZER_BODY);
File Tailor.java
has 274 lines of code (exceeds 250 allowed). Consider refactoring. Open
package com.sleekbyte.tailor;
import com.sleekbyte.tailor.antlr.SwiftBaseListener;
import com.sleekbyte.tailor.antlr.SwiftLexer;
import com.sleekbyte.tailor.antlr.SwiftParser;
CommaWhitespaceListener
has 23 methods (exceeds 20 allowed). Consider refactoring. Open
public final class CommaWhitespaceListener extends SwiftBaseListener {
private WhitespaceVerifier verifier;
public CommaWhitespaceListener(Printer printer) {
File Configuration.java
has 268 lines of code (exceeds 250 allowed). Consider refactoring. Open
package com.sleekbyte.tailor.utils;
import com.google.gson.Gson;
import com.google.gson.JsonSyntaxException;
import com.sleekbyte.tailor.common.ColorSettings;
Printer
has 22 methods (exceeds 20 allowed). Consider refactoring. Open
public final class Printer implements Comparable<Printer> {
private File inputFile;
private Severity maxSeverity;
private Formatter formatter;
Identical blocks of code found in 3 locations. Consider refactoring. Open
if (msg.getColumnNumber() != 0) {
begin.put(Messages.LINE_KEY, msg.getLineNumber());
begin.put(Messages.COLUMN_KEY, msg.getColumnNumber());
end.put(Messages.LINE_KEY, msg.getLineNumber());
end.put(Messages.COLUMN_KEY, msg.getColumnNumber());
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 146.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Identical blocks of code found in 3 locations. Consider refactoring. Open
if (msg.getColumnNumber() != 0) {
begin.put(Messages.LINE_KEY, msg.getLineNumber());
begin.put(Messages.COLUMN_KEY, msg.getColumnNumber());
end.put(Messages.LINE_KEY, msg.getLineNumber());
end.put(Messages.COLUMN_KEY, msg.getColumnNumber());
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 146.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76