Showing 152 of 153 total issues
Method fire
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
@Override
public void fire() {
final List<Tag> remoteUpdates = new ArrayList<>();
final Map<Long, Tag> localTagMap = localTags
.all()
- Read upRead up
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
Method fire
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
@Override
public void fire() {
final List<Metadata> remoteUpdates = new ArrayList<>();
final Map<Long, Metadata> localMetadataMap = localMetadataSet.all()
.stream()
- Read upRead up
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
Method sync
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
@Override
public void sync() {
try {
if (isSyncing) {
return;
- Read upRead up
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
Method updateRemotes
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private void updateRemotes(List<Jot> remoteUpdates) {
final List<Future<?>> asyncFuture = new ArrayList<>();
for (Jot remoteUpdate : remoteUpdates) {
if (remoteUpdate.deleted()) {
asyncFuture.add(
- Read upRead up
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
Method calculate
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private long calculate(File file) {
if (file.isDirectory()) {
long result = 0;
File[] files = file.listFiles();
if (files == null) {
- Read upRead up
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
Method save
has a Cognitive Complexity of 22 (exceeds 20 allowed). Consider refactoring. Open
suspend fun save() = withContext(IO) {
preferTags()
val savedJot = nyx.jots().update(object : WrappedJot(jot.value ?: ConstJot()) {
override fun content() = content.value ?: ""
override fun title() = title.value ?: ""
- Read upRead up
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 too many return
statements within this method. Open
return ITEM_TYPE_VIDEO;
Method onActivityResult
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
@Override
public void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (requestCode == REQUEST_CODE_PICK_FILE && resultCode == RESULT_OK) {
- Read upRead up
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
Method getItemViewType
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
@Override
public int getItemViewType(int position) {
final Uri uri = data.get(position);
final String mimeType = new UriMimeType(
context,
- Read upRead up
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
'}' at column 60 should be alone on a line. Open
public StoredTokenSrc(Ceres ceres) {this.ceres = ceres;}
- Read upRead up
- Exclude checks
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.
'+' should be on a new line. Open
" function backToApp() {\n" +
- Read upRead up
- Exclude checks
Checks the policy on how to wrap lines on operators.
This documentation is written and maintained by the Checkstyle community and is covered under the same license as the Checkstyle project.
Parameter name 'e' must match pattern '^[a-z][a-z0-9][a-zA-Z0-9]*$'. Open
public void onError(Exception e) {
- Read upRead up
- Exclude checks
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.
First sentence of Javadoc is missing an ending period. Open
/**
- Read upRead up
- Exclude checks
Checks thatJavadoc summary sentence does not contain phrases that are not recommended to use.Summaries that contain only the {@inheritDoc}
tag are skipped. Check alsoviolate Javadoc that does not contain first sentence.
This documentation is written and maintained by the Checkstyle community and is covered under the same license as the Checkstyle project.
First sentence of Javadoc is missing an ending period. Open
/**
- Read upRead up
- Exclude checks
Checks thatJavadoc summary sentence does not contain phrases that are not recommended to use.Summaries that contain only the {@inheritDoc}
tag are skipped. Check alsoviolate Javadoc that does not contain first sentence.
This documentation is written and maintained by the Checkstyle community and is covered under the same license as the Checkstyle project.
'}' at column 45 should be alone on a line. Open
public JotJson(Jot jot) {this.jot = jot;}
- Read upRead up
- Exclude checks
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.
'}' at column 57 should be alone on a line. Open
public JsonMetadata(JsonObject obj) {this.obj = obj;}
- Read upRead up
- Exclude checks
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.
'+' should be on a new line. Open
"<body>\n" +
- Read upRead up
- Exclude checks
Checks the policy on how to wrap lines on operators.
This documentation is written and maintained by the Checkstyle community and is covered under the same license as the Checkstyle project.
'+' should be on a new line. Open
" You are logged in.\n" +
- Read upRead up
- Exclude checks
Checks the policy on how to wrap lines on operators.
This documentation is written and maintained by the Checkstyle community and is covered under the same license as the Checkstyle project.
'+' should be on a new line. Open
" \n" +
- Read upRead up
- Exclude checks
Checks the policy on how to wrap lines on operators.
This documentation is written and maintained by the Checkstyle community and is covered under the same license as the Checkstyle project.
'+' should be on a new line. Open
" <!-- Define the button to \n" +
- Read upRead up
- Exclude checks
Checks the policy on how to wrap lines on operators.
This documentation is written and maintained by the Checkstyle community and is covered under the same license as the Checkstyle project.