coding-blocks/DigitalOceanApp

View on GitHub
app/src/main/java/in/tosc/digitaloceanapp/adapters/DropletsAdapter.java

Summary

Maintainability
A
0 mins
Test Coverage

Wrong lexicographical order for 'in.tosc.doandroidlib.objects.Droplet' import. Should be before 'java.util.List'.
Open

import in.tosc.doandroidlib.objects.Droplet;

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 'dropletRAM' must contain no more than '2' consecutive capital letters.
Open

        TextView dropletRAM;

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.

Extra separation in import group before 'java.util.List'
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.

Wrong lexicographical order for 'in.tosc.digitaloceanapp.R' import. Should be before 'java.util.List'.
Open

import in.tosc.digitaloceanapp.R;

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.

'METHOD_DEF' should be separated from previous line.
Open

        @Override

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.

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

            intent.putExtra("DROPLET", gson.toJson(dropletList.get(getAdapterPosition()), Droplet.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.

Wrong lexicographical order for 'in.tosc.digitaloceanapp.activities.DetailDropletActivity' import. Should be before 'java.util.List'.
Open

import in.tosc.digitaloceanapp.activities.DetailDropletActivity;

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.

Parameter name 'v' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9]*$'.
Open

        public void onClick(View v) {

Checks that method parameter names conform to a specified pattern.By using accessModifiers property it is possibleto specify different formats for methods at different visibility levels.

To validate catch parameters please useCatchParameterName.

To validate lambda parameters please useLambdaParameterName.

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

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

        View itemView = LayoutInflater.from(parent.getContext()).inflate(R.layout.single_droplet, parent, false);

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.

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

        holder.dropletSize.setText(String.format(context.getResources().getString(R.string.droplet_disk_size), String.valueOf(droplet.getDiskSize())));

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.

Extra separation in import group before 'com.google.gson.Gson'
Open

import com.google.gson.Gson;

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.

Extra separation in import group before 'in.tosc.digitaloceanapp.R'
Open

import in.tosc.digitaloceanapp.R;

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.

Empty if block.
Open

        if (droplet.getStatus().toString().equals("active")) {

Checks for empty blocks. This check does not validate sequential blocks.

Sequential blocks won't be checked. Also, no violations for fallthrough:

<source><br>switch (a) {<br> case 1: // no violation<br> case 2: // no violation<br> case 3: someMethod(); { } // no violation<br> default: break;<br>}<br> </source>

NOTE: This check processes LITERAL_CASE and LITERAL_DEFAULT separately.Verification empty block is done for single most nearest {@code case} or {@code default}.

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

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

        holder.dropletRAM.setText(String.format(context.getResources().getString(R.string.droplet_memory), String.valueOf(droplet.getMemorySizeInMb())));

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.

There are no issues that match your filters.

Category
Status