sjsucohort6/amigo-chatbot

View on GitHub
db-common/src/main/java/edu/sjsu/amigo/db/common/mongodb/BaseDAOImpl.java

Summary

Maintainability
A
0 mins
Test Coverage

Line is longer than 100 characters (found 104).
Open

 * Implements all methods except update() that needs to be implemented for each entity in its DAO class.

Checks for long lines.

Rationale: Long lines are hard to read in printouts or if developershave limited screen space for the source code, e.g. if the IDEdisplays additional information like project tree, class hierarchy,etc.

This documentation is written and maintained by the Checkstyle community and is covered under the same license as the Checkstyle project.

'CTOR_DEF' should be separated from previous line.
Open

    protected BaseDAOImpl(MongoClient mongoClient, Morphia morphia, String dbName) {

Checks for empty line separators before package, all import declarations,fields, constructors, methods, nested classes,static initializers and instance initializers.

Checks for empty line separators before not only statements butimplementation and documentation comments and blocks as well.

ATTENTION: empty line separator is required between token siblings,not after line where token is found.If token does not have same type sibling then empty lineis required at its end (for example for CLASS_DEF it is after '}').Also, trailing comments are skipped.

ATTENTION: violations from multiple empty lines cannot be suppressed via XPath:#8179.

This documentation is written and maintained by the Checkstyle community and is covered under the same license as the Checkstyle project.

Empty line should be followed by <p> tag on the next line.</p>
Open

 *

Checks the Javadoc paragraph.

Checks that:

  • There is one blank line between each of two paragraphs.
  • Each paragraph but the first has <p> immediately before the first word, withno space after.

This documentation is written and maintained by the Checkstyle community and is covered under the same license as the Checkstyle project.

Empty line should be followed by <p> tag on the next line.</p>
Open

 *

Checks the Javadoc paragraph.

Checks that:

  • There is one blank line between each of two paragraphs.
  • Each paragraph but the first has <p> immediately before the first word, withno space after.

This documentation is written and maintained by the Checkstyle community and is covered under the same license as the Checkstyle project.

Only one statement per line allowed.
Open

            update(new ArrayList<T>(){{add(entity);}});

Checks that there is only one statement per line.

Rationale: It's very difficult to read multiple statements on one line.

In the Java programming language, statements are the fundamental unit ofexecution. All statements except blocks are terminated by a semicolon.Blocks are denoted by open and close curly braces.

OneStatementPerLineCheck checks the following types of statements:variable declaration statements, empty statements, import statements,assignment statements, expression statements, increment statements,object creation statements, 'for loop' statements, 'break' statements,'continue' statements, 'return' statements, resources statements (optional).

This documentation is written and maintained by the Checkstyle community and is covered under the same license as the Checkstyle project.

Extra separation in import group before 'java.util.ArrayList'
Open

import java.util.ArrayList;

Checks that the groups of import declarations appear in the order specifiedby the user. If there is an import but its group is not specified in theconfiguration such an import should be placed at the end of the import list.

This documentation is written and maintained by the Checkstyle community and is covered under the same license as the Checkstyle project.

Wrong lexicographical order for 'java.util.List' import. Should be before 'org.mongodb.morphia.query.QueryResults'.
Open

import java.util.List;

Checks that the groups of import declarations appear in the order specifiedby the user. If there is an import but its group is not specified in theconfiguration such an import should be placed at the end of the import list.

This documentation is written and maintained by the Checkstyle community and is covered under the same license as the Checkstyle project.

'}' at column 49 should be alone on a line.
Open

            add(new ArrayList<T>(){{add(entity);}});

Checks the placement of right curly braces ('}') for code blocks.This check supports if-else, try-catch-finally blocks, while-loops, for-loops,method definitions, class definitions, constructor definitions,instance, static initialization blocks, annotation definitions and enum definitions.For right curly brace of expression blocks of arrays, lambdas and class instancesplease follow issue#5945.For right curly brace of enum constant please follow issue#7519.

This documentation is written and maintained by the Checkstyle community and is covered under the same license as the Checkstyle project.

Only one statement per line allowed.
Open

            add(new ArrayList<T>(){{add(entity);}});

Checks that there is only one statement per line.

Rationale: It's very difficult to read multiple statements on one line.

In the Java programming language, statements are the fundamental unit ofexecution. All statements except blocks are terminated by a semicolon.Blocks are denoted by open and close curly braces.

OneStatementPerLineCheck checks the following types of statements:variable declaration statements, empty statements, import statements,assignment statements, expression statements, increment statements,object creation statements, 'for loop' statements, 'break' statements,'continue' statements, 'return' statements, resources statements (optional).

This documentation is written and maintained by the Checkstyle community and is covered under the same license as the Checkstyle project.

'}' at column 9 should be alone on a line.
Open

        }});

Checks the placement of right curly braces ('}') for code blocks.This check supports if-else, try-catch-finally blocks, while-loops, for-loops,method definitions, class definitions, constructor definitions,instance, static initialization blocks, annotation definitions and enum definitions.For right curly brace of expression blocks of arrays, lambdas and class instancesplease follow issue#5945.For right curly brace of enum constant please follow issue#7519.

This documentation is written and maintained by the Checkstyle community and is covered under the same license as the Checkstyle project.

Wrong lexicographical order for 'java.util.ArrayList' import. Should be before 'org.mongodb.morphia.query.QueryResults'.
Open

import java.util.ArrayList;

Checks that the groups of import declarations appear in the order specifiedby the user. If there is an import but its group is not specified in theconfiguration such an import should be placed at the end of the import list.

This documentation is written and maintained by the Checkstyle community and is covered under the same license as the Checkstyle project.

Abbreviation in name 'BaseDAOImpl' must contain no more than '2' consecutive capital letters.
Open

public abstract class BaseDAOImpl<T> extends BasicDAO<T, String> implements BaseDAO<T> {

Validates abbreviations (consecutive capital letters) length in identifier name,it also allows to enforce camel case naming. Please read more atGoogle Style Guideto get to know how to avoid long abbreviations in names.

allowedAbbreviationLength specifies how many consecutive capital letters areallowed in the identifier.A value of 3 indicates that up to 4 consecutive capital letters are allowed,one after the other, before a violation is printed. The identifier 'MyTEST' would beallowed, but 'MyTESTS' would not be.A value of 0 indicates that only 1 consecutive capital letter is allowed. Thisis what should be used to enforce strict camel casing. The identifier 'MyTest' wouldbe allowed, but 'MyTEst' would not be.

ignoreFinal, ignoreStatic, and ignoreStaticFinalcontrol whether variables with the respective modifiers are to be ignored.Note that a variable that is both static and final will always be considered underignoreStaticFinal only, regardless of the values of ignoreFinaland ignoreStatic. So for example if ignoreStatic is true butignoreStaticFinal is false, then static final variables will not be ignored.

This documentation is written and maintained by the Checkstyle community and is covered under the same license as the Checkstyle project.

'}' at column 52 should be alone on a line.
Open

            update(new ArrayList<T>(){{add(entity);}});

Checks the placement of right curly braces ('}') for code blocks.This check supports if-else, try-catch-finally blocks, while-loops, for-loops,method definitions, class definitions, constructor definitions,instance, static initialization blocks, annotation definitions and enum definitions.For right curly brace of expression blocks of arrays, lambdas and class instancesplease follow issue#5945.For right curly brace of enum constant please follow issue#7519.

This documentation is written and maintained by the Checkstyle community and is covered under the same license as the Checkstyle project.

There are no issues that match your filters.

Category
Status