koraktor/mavanagaiata

View on GitHub
src/main/java/com/github/koraktor/mavanagaiata/mojo/ContributorsMojo.java

Summary

Maintainability
A
1 hr
Test Coverage
A
91%

Method writeOutput has 29 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    @Override
    protected void writeOutput(GitRepository repository)
            throws MavanagaiataMojoException {
        try {
            mailMap = repository.getMailMap();

    Method writeOutput has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
    Open

        @Override
        protected void writeOutput(GitRepository repository)
                throws MavanagaiataMojoException {
            try {
                mailMap = repository.getMailMap();

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Avoid reassigning parameters such as 'name'
    Open

        private String escapeName(String name) {

    AvoidReassigningParameters

    Since: PMD 1.0

    Priority: Medium High

    Categories: Style

    Remediation Points: 50000

    Reassigning values to incoming parameters is not recommended. Use temporary local variables instead.

    Example:

    public class Foo {
     private void foo(String bar) {
     bar = 'something else';
     }
    }

    Avoid excessively long variable names like MARKDOWN_TRANSLATION_MAP
    Open

        private static final Map<CharSequence, CharSequence> MARKDOWN_TRANSLATION_MAP = new HashMap<>();

    LongVariable

    Since: PMD 0.3

    Priority: Medium

    Categories: Style

    Remediation Points: 50000

    Fields, formal arguments, or local variable names that are too long can make the code difficult to follow.

    Example:

    public class Something {
     int reallyLongIntName = -3; // VIOLATION - Field
     public static void main( String argumentsList[] ) { // VIOLATION - Formal
     int otherReallyLongName = -5; // VIOLATION - Local
     for (int interestingIntIndex = 0; // VIOLATION - For
     interestingIntIndex < 10;
     interestingIntIndex ++ ) {
     }
    }

    Avoid reassigning parameters such as 'name'
    Open

        private String escapeName(String name) {

    AvoidReassigningParameters

    Since: PMD 1.0

    Priority: Medium High

    Categories: Style

    Remediation Points: 50000

    Reassigning values to incoming parameters is not recommended. Use temporary local variables instead.

    Example:

    public class Foo {
     private void foo(String bar) {
     bar = 'something else';
     }
    }

    Avoid excessively long variable names like MARKDOWN_TRANSLATOR
    Open

        private static final CharSequenceTranslator MARKDOWN_TRANSLATOR = new LookupTranslator(MARKDOWN_TRANSLATION_MAP);

    LongVariable

    Since: PMD 0.3

    Priority: Medium

    Categories: Style

    Remediation Points: 50000

    Fields, formal arguments, or local variable names that are too long can make the code difficult to follow.

    Example:

    public class Something {
     int reallyLongIntName = -3; // VIOLATION - Field
     public static void main( String argumentsList[] ) { // VIOLATION - Formal
     int otherReallyLongName = -5; // VIOLATION - Local
     for (int interestingIntIndex = 0; // VIOLATION - For
     interestingIntIndex < 10;
     interestingIntIndex ++ ) {
     }
    }

    There are no issues that match your filters.

    Category
    Status