Fixes some `SpellCheckingInspection` inspection violations.
Description:
>Spellchecker inspection helps locate typos and misspelling in your code, comments and literals.
While suppression works fine, it causes false positive in `RedundantSuppression` inspection reported as [IDEA-144818](https://youtrack.jetbrains.com/issue/IDEA-144818).
Tag `@noinspection` is self-descriptive enough on its own.
ParameterNameDiffersFromOverriddenParameter does not require parameters to match names anymore if method is from external library and parameter may be wrongly named there.
Fixes some `SpellCheckingInspection` inspection violations.
Description:
>Spellchecker inspection helps locate typos and misspelling in your code, comments and literals.
Fixes some `SpellCheckingInspection` inspection violations.
Description:
>Spellchecker inspection helps locate typos and misspelling in your code, comments and literals.
Fixes some `TestMethodWithoutAssertion` inspection violations.
Description:
>Reports test methods of JUnit test case classes that do not contain any assertions. Such methods indicate either incomplete or weak test cases.
Fixes `ConditionalExpression` inspection violations.
Description:
>Reports the ternary condition operator. Some coding standards prohibit the use of the condition operator, in favor of if-else statements.
Fixes `SpellCheckingInspection` inspection violations introduced in recent commits.
Description:
>Spellchecker inspection helps locate typos and misspelling in your code, comments and literals.
Fixes `ProblematicWhitespace` inspection violations introduced in recent commits.
Description:
>Reports tabs used for indentation when the code style is configured to use only spaces.
Fixes `LocalVariableNamingConvention` inspection violations introduced in recent commits.
Description:
>Reports local variables whose names are either too short, too long, or do not follow the specified regular expression pattern.
Fixes `ZeroLengthArrayInitialization` inspection violations introduced in recent commits.
Description:
>Reports on allocations of arrays with known lengths of zero. Since array lengths in Java are non-modifiable, it is almost always possible to share zero-length arrays, rather than repeatedly allocating new zero-length arrays. Such sharing may provide useful optimizations in program runtime or footprint. Note that this inspection does not report zero-length arrays allocated as static final fields, as it is assumed that those arrays are being used to implement array sharing.
Fixes `SimplifiableJUnitAssertion` inspection violations introduced in recent commits.
Description:
>Reports any JUnit assertTrue calls which can be replaced by equivalent assertEquals calls. assertEquals calls will normally give better error messages in case of test failure than assertTrue can.
Fixes `MisorderedAssertEqualsParameters` inspection violations introduced in recent commits.
Description:
>Reports any calls to JUnit assertEquals() which have a non-literal as the expected result argument and a literal as the actual result argument. Such calls will behave fine for assertions which pass, but may give confusing error reports if their expected and actual arguments differ.
Fixes `StringToUpperWithoutLocale` inspection violations introduced in recent commits.
Description:
>Reports any call of toUpperCase() or toLowerCase() on String objects which do not specify a java.util.Locale. Such calls are usually incorrect in an internationalized environment.
Fixes `NewExceptionWithoutArguments` inspection violations introduced in recent commits.
Description:
>Reports exception instance creation without any arguments specified. When an exception is constructed without arguments it contains no information about the fault that happened, which makes debugging needlessly hard.
Fixes `TooBroadScope` inspection violations introduced in recent commits.
Description:
>Reports any variable declarations of which the scope can be narrowed. Especially useful for "Pascal style" declarations at the start of a method, but variables with too broad a scope are also often left over after refactorings.
Fixes `UnnecessaryFullyQualifiedName` inspection violations introduced in recent commits.
Description:
>Reports on fully qualified class names which can be shortened. The quick fix for this inspection will shorten the fully qualified names, adding import statements as necessary.
Inspection in this case is right. Parameter `Properties` can be replaced with `Map<Object, Object>`. It works fine with Checkstyle, but it breaks binary compatiblity with Maven Checkstyle Plugin, which is not acceptable.
Fixes `DeclareCollectionAsInterface` inspection violations.
Description:
>Reports on declarations of Collection variables made by using the collection class as the type, rather than an appropriate interface.
Fixes `TestCaseWithConstructor` inspection violations.
Description:
>Reports on JUnit test cases with initialization logic in their constructors. Initialization of JUnit test cases should be done in setUp() methods instead.
Fixes `UnnecessaryUnboxing` inspection violations.
Description:
>Reports "unboxing", e.g. explicit unwrapping of wrapped primitive values. Unboxing is unnecessary under Java 5 and newer, and can be safely removed.
This inspection only reports if the project or module is configured to use a language level of 5.0 or higher.
Fixes `UnnecessaryBoxing` inspection violations.
Description:
>Reports "boxing", e.g. wrapping of primitive values in objects. Boxing is unnecessary under Java 5 and newer, and can be safely removed.
This inspection only reports if the project or module is configured to use a language level of 5.0 or higher.
Fixes `Element (a.dl-link) is overqualified, just use .dl-link without element name.`
Description:
>Using selector like the one bellow is almost every time unnecessary, unless the element name causes the class to behave differently you can omit it. With this you will shrink the file size and speedup your page load time.
Fixes `Rule is empty` inspection violations.
Description:
>An empty rule is one that doesn't contain any properties, such as:
```
.foo {
}
```
A lot of times, empty rules appear as a result of refactoring without further cleanup. Eliminating empty rules results in smaller file sizes and less style information for the browser to deal with.
Fixes `ParameterNameDiffersFromOverriddenParameter` inspection violation.
Description:
>Reports parameters that have different names from the corresponding parameters in the methods they override. While legal in Java, such inconsistent names may be confusing, and lessen the documentation benefits of good naming practices.
Fixes `ParameterNameDiffersFromOverriddenParameter` inspection violation.
Description:
>Reports parameters that have different names from the corresponding parameters in the methods they override. While legal in Java, such inconsistent names may be confusing, and lessen the documentation benefits of good naming practices.
Fixes `IfStatementWithIdenticalBranches` inspection violation.
Description:
>Reports if statements with identical "then" and else branches. Such statements are almost certainly programmer error.
Fixes `IfStatementWithTooManyBranches` inspection violation.
Description:
>Reports if statements with too many branches. Such statements may be confusing, and are often the sign of inadequate levels of design abstraction.
Fixes `TooBroadScope` inspection violation.
Description:
>Reports any variable declarations of which the scope can be narrowed. Especially useful for "Pascal style" declarations at the start of a method, but variables with too broad a scope are also often left over after refactorings.
Fixes `MethodMayBeStatic` inspection violation.
Description:
>Reports any methods which may safely be made static. A method may be static if it is not synchronized, it does not reference any of its class' non static methods and non static fields and is not overridden in a sub class.
Fixes `WhileCanBeForeach` inspection violation.
Description:
>Reports while loops which iterate over collections, and can be replaced with the foreach iteration syntax, which is available in Java 5 and newer.
This inspection only reports if the project or module is configured to use a language level of 5.0 or higher.
Fixes `ReturnOfCollectionField` inspection violation.
Description:
>Reports any attempt to return an array or Collection field from a method. Since the array or Collection may have its contents modified by the calling method, this construct may result in an object having its state modified unexpectedly. While occasionally useful for performance reasons, this construct is inherently bug-prone.
Fixes `ReuseOfLocalVariable` inspection violation.
Description:
>Reports local variables that are "reused", overwriting their values with new values unrelated to their original use. Such local variable reuse may be confusing, as the intended semantics of the local variable may vary with each use. It may also be prone to bugs, if code changes result in values that were thought to be overwritten actually being live. It is good practices to keep variable lifetimes as short as possible, and not reuse local variables for the sake of brevity.
Fixes `UnusedAssignment` inspection violations.
Description:
>This inspection points out the cases where a variable value is never used after its assignment, i.e.:
- the variable never gets read after assignment OR
- the value is always overwritten with another assignment before the next variable read OR
- the variable initializer is redundant (for one of the above two reasons) OR
- the variable is never used.
The issue was stream not being closed at all or closed, but not in finally block.
Fixes some `IOResource` inspection violations.
Description:
>Reports any I/O resource which is not safely closed in a finally block. Such resources may be inadvertently leaked if an exception is thrown before the resource is closed. I/O resources checked by this inspection include java.io.InputStream, java.io.OutputStream, java.io.Reader, java.io.Writer and java.io.RandomAccessFile. I/O resources which are wrapped by other I/O resources are not reported, as the wrapped resource will be closed by the wrapping resource.
Fixes `SpellCheckingInspection` inspection violation.
Description:
>Spellchecker inspection helps locate typos and misspelling in your code, comments and literals
Fixes `NegatedIfElse` inspection violation.
Description:
>Reports if statements which contain else branches and whose conditions are negated. Flipping the order of the if and else branches will usually increase the clarity of such statements.
Fixes `ReuseOfLocalVariable` inspection violation.
Description:
>Reports local variables that are "reused", overwriting their values with new values unrelated to their original use. Such local variable reuse may be confusing, as the intended semantics of the local variable may vary with each use. It may also be prone to bugs, if code changes result in values that were thought to be overwritten actually being live. It is good practices to keep variable lifetimes as short as possible, and not reuse local variables for the sake of brevity.
Fixes `UnusedImport` inspection violations.
Description:
>Reports any import statements that are unused. Since IDEA can automatically detect and fix such statements with its "Optimize Imports" command, this inspection is mostly useful for off-line reporting on code bases that you don't intend to change.
Fixes `MethodCanBeVariableArityMethod` inspection violations.
Description:
>Reports methods with which can be converted to be a variable arity/varargs method, available in Java 5 and newer.
This inspection only reports if the project or module is configured to use a language level of 5.0 or higher.
Fixes `JUnitRule` inspection violations.
Description:
>Reports malformed @Rule/@ClassRule usages:
* Checks for any member that is annotated with @Rule but is not public.
* Checks for any member that is annotated with @ClassRule but is not public or not static.
Fixes `UseOfObsoleteAssert` inspection violations.
Description:
>Reports any calls to methods from the junit.framework.Assert class. This class is obsolete and the calls can be replaced by calls to methods from the org.junit.Assert class.
Fixes `BooleanMethodNameMustStartWithQuestion` inspection violations.
Description:
>Reports boolean methods whose names do not start with a question word. Boolean methods that override library methods are ignored by this inspection.
Fixes `MethodMayBeStatic` inspection violations.
Description:
>Reports any methods which may safely be made static. A method may be static if it is not synchronized, it does not reference any of its class' non static methods and non static fields and is not overridden in a sub class.
Fixes `UnusedAssignment` inspection violations.
Description:
>This inspection points out the cases where a variable value is never used after its assignment
Fixes `ClassNewInstance` inspection violations.
Description:
>Reports any calls to java.lang.Class.newInstance(). The newInstance method propagates any exception thrown by the no-arg constructor, including checked exceptions. Use of this method effectively bypasses the compile-time exception checking that would otherwise be performed by the compiler. Replacing such a method call with a call to the java.lang.reflect.Constructor.newInstance() method avoids this problem by wrapping any exception thrown by the constructor in a java.lang.reflect.InvocationTargetException.
Fixes `UnusedParameters` inspection violations.
Description:
>This inspection reports parameters that are not used by their methods and all method implementations/overriders.
The issue was stream not being closed at all or closed, but not in finally block.
Fixes some `IOResource` inspection violations.
Description:
>Reports any I/O resource which is not safely closed in a finally block. Such resources may be inadvertently leaked if an exception is thrown before the resource is closed. I/O resources checked by this inspection include java.io.InputStream, java.io.OutputStream, java.io.Reader, java.io.Writer and java.io.RandomAccessFile. I/O resources which are wrapped by other I/O resources are not reported, as the wrapped resource will be closed by the wrapping resource.
Fixes `ForLoopWithMissingComponent` inspection violation.
Description:
>Reports for loops that lack initialization, condition, or update clauses. Some coding styles prohibit such loops.
Fixes `OverlyComplexBooleanExpression` inspection violation.
Description:
>Reports boolean expressions with too many terms. Such expressions may be confusing and bug-prone.