Skip to content

Added patch from Jasper. Addressed Jasper's comments. Changed generat…

Codacy Production / Codacy Static Code Analysis required action Nov 20, 2023 in 0s

39 new issues (0 max.) of at least minor severity.

Codacy Here is an overview of what got changed by this pull request:

Issues
======
+ Solved 28
- Added 39
           

Coverage decreased per file
===========================
- pbj-core/pbj-compiler/src/main/java/com/hedera/pbj/compiler/impl/Common.java  -14.868
         

Complexity increasing per file
==============================
- pbj-integration-tests/src/jmh/java/com/hedera/pbj/intergration/jmh/ComplexEqualsHashCodeBench.java  2
- pbj-integration-tests/src/test/java/com/hedera/pbj/intergration/test/HashEqualsTest.java  1
- pbj-integration-tests/src/jmh/java/com/hedera/pbj/intergration/jmh/HashBench.java  2
- pbj-integration-tests/src/jmh/java/com/hedera/pbj/intergration/jmh/EqualsHashCodeBench.java  2
- pbj-integration-tests/src/test/java/com/hedera/pbj/intergration/test/TestHashFunctions.java  23
         

Clones added
============
- pbj-core/pbj-compiler/src/main/java/com/hedera/pbj/compiler/impl/generators/json/JsonCodecParseMethodGenerator.java  2
         

Clones removed
==============
+ pbj-core/pbj-compiler/src/main/java/com/hedera/pbj/compiler/impl/generators/protobuf/CodecParseMethodGenerator.java  -2
         

See the complete overview on Codacy

Annotations

Check warning on line 272 in pbj-core/pbj-compiler/src/main/java/com/hedera/pbj/compiler/impl/Common.java

See this annotation in the file changed.

@codacy-production codacy-production / Codacy Static Code Analysis

pbj-core/pbj-compiler/src/main/java/com/hedera/pbj/compiler/impl/Common.java#L272

Avoid throwing raw exception types.

Check notice on line 272 in pbj-core/pbj-compiler/src/main/java/com/hedera/pbj/compiler/impl/Common.java

See this annotation in the file changed.

@codacy-production codacy-production / Codacy Static Code Analysis

pbj-core/pbj-compiler/src/main/java/com/hedera/pbj/compiler/impl/Common.java#L272

Line is longer than 120 characters (found 138).

Check warning on line 288 in pbj-core/pbj-compiler/src/main/java/com/hedera/pbj/compiler/impl/Common.java

See this annotation in the file changed.

@codacy-production codacy-production / Codacy Static Code Analysis

pbj-core/pbj-compiler/src/main/java/com/hedera/pbj/compiler/impl/Common.java#L288

Avoid reassigning parameters such as 'generatedCodeSoFar'

Check notice on line 330 in pbj-core/pbj-compiler/src/main/java/com/hedera/pbj/compiler/impl/Common.java

See this annotation in the file changed.

@codacy-production codacy-production / Codacy Static Code Analysis

pbj-core/pbj-compiler/src/main/java/com/hedera/pbj/compiler/impl/Common.java#L330

Line is longer than 120 characters (found 129).

Check warning on line 368 in pbj-core/pbj-compiler/src/main/java/com/hedera/pbj/compiler/impl/Common.java

See this annotation in the file changed.

@codacy-production codacy-production / Codacy Static Code Analysis

pbj-core/pbj-compiler/src/main/java/com/hedera/pbj/compiler/impl/Common.java#L368

Avoid reassigning parameters such as 'generatedCodeSoFar'

Check notice on line 368 in pbj-core/pbj-compiler/src/main/java/com/hedera/pbj/compiler/impl/Common.java

See this annotation in the file changed.

@codacy-production codacy-production / Codacy Static Code Analysis

pbj-core/pbj-compiler/src/main/java/com/hedera/pbj/compiler/impl/Common.java#L368

Line is longer than 120 characters (found 121).

Check notice on line 407 in pbj-core/pbj-compiler/src/main/java/com/hedera/pbj/compiler/impl/Common.java

See this annotation in the file changed.

@codacy-production codacy-production / Codacy Static Code Analysis

pbj-core/pbj-compiler/src/main/java/com/hedera/pbj/compiler/impl/Common.java#L407

Must have at least one statement.

Check notice on line 437 in pbj-core/pbj-compiler/src/main/java/com/hedera/pbj/compiler/impl/Common.java

See this annotation in the file changed.

@codacy-production codacy-production / Codacy Static Code Analysis

pbj-core/pbj-compiler/src/main/java/com/hedera/pbj/compiler/impl/Common.java#L437

Line is longer than 120 characters (found 146).

Check notice on line 193 in pbj-core/pbj-compiler/src/main/java/com/hedera/pbj/compiler/impl/generators/EnumGenerator.java

See this annotation in the file changed.

@codacy-production codacy-production / Codacy Static Code Analysis

pbj-core/pbj-compiler/src/main/java/com/hedera/pbj/compiler/impl/generators/EnumGenerator.java#L193

Line is longer than 120 characters (found 148).

Check notice on line 199 in pbj-core/pbj-compiler/src/main/java/com/hedera/pbj/compiler/impl/generators/EnumGenerator.java

See this annotation in the file changed.

@codacy-production codacy-production / Codacy Static Code Analysis

pbj-core/pbj-compiler/src/main/java/com/hedera/pbj/compiler/impl/generators/EnumGenerator.java#L199

Line is longer than 120 characters (found 125).

Check notice on line 40 in pbj-core/pbj-compiler/src/main/java/com/hedera/pbj/compiler/impl/generators/ModelGenerator.java

See this annotation in the file changed.

@codacy-production codacy-production / Codacy Static Code Analysis

pbj-core/pbj-compiler/src/main/java/com/hedera/pbj/compiler/impl/generators/ModelGenerator.java#L40

File contains tab characters (this is the first instance).

Check notice on line 284 in pbj-core/pbj-compiler/src/main/java/com/hedera/pbj/compiler/impl/generators/ModelGenerator.java

See this annotation in the file changed.

@codacy-production codacy-production / Codacy Static Code Analysis

pbj-core/pbj-compiler/src/main/java/com/hedera/pbj/compiler/impl/generators/ModelGenerator.java#L284

Line is longer than 120 characters (found 124).

Check notice on line 490 in pbj-core/pbj-compiler/src/main/java/com/hedera/pbj/compiler/impl/generators/ModelGenerator.java

See this annotation in the file changed.

@codacy-production codacy-production / Codacy Static Code Analysis

pbj-core/pbj-compiler/src/main/java/com/hedera/pbj/compiler/impl/generators/ModelGenerator.java#L490

Line is longer than 120 characters (found 131).

Check notice on line 142 in pbj-core/pbj-compiler/src/main/java/com/hedera/pbj/compiler/impl/generators/TestGenerator.java

See this annotation in the file changed.

@codacy-production codacy-production / Codacy Static Code Analysis

pbj-core/pbj-compiler/src/main/java/com/hedera/pbj/compiler/impl/generators/TestGenerator.java#L142

Line is longer than 120 characters (found 200).

Check notice on line 99 in pbj-core/pbj-compiler/src/main/java/com/hedera/pbj/compiler/impl/generators/json/JsonCodecParseMethodGenerator.java

See this annotation in the file changed.

@codacy-production codacy-production / Codacy Static Code Analysis

pbj-core/pbj-compiler/src/main/java/com/hedera/pbj/compiler/impl/generators/json/JsonCodecParseMethodGenerator.java#L99

Line is longer than 80 characters (found 127).

Check notice on line 53 in pbj-core/pbj-compiler/src/main/java/com/hedera/pbj/compiler/impl/generators/protobuf/CodecParseMethodGenerator.java

See this annotation in the file changed.

@codacy-production codacy-production / Codacy Static Code Analysis

pbj-core/pbj-compiler/src/main/java/com/hedera/pbj/compiler/impl/generators/protobuf/CodecParseMethodGenerator.java#L53

Line is longer than 120 characters (found 136).

Check notice on line 64 in pbj-integration-tests/src/jmh/java/com/hedera/pbj/intergration/jmh/ComplexEqualsHashCodeBench.java

See this annotation in the file changed.

@codacy-production codacy-production / Codacy Static Code Analysis

pbj-integration-tests/src/jmh/java/com/hedera/pbj/intergration/jmh/ComplexEqualsHashCodeBench.java#L64

'VARIABLE_DEF' should be separated from previous line.

Check notice on line 67 in pbj-integration-tests/src/jmh/java/com/hedera/pbj/intergration/jmh/ComplexEqualsHashCodeBench.java

See this annotation in the file changed.

@codacy-production codacy-production / Codacy Static Code Analysis

pbj-integration-tests/src/jmh/java/com/hedera/pbj/intergration/jmh/ComplexEqualsHashCodeBench.java#L67

'VARIABLE_DEF' should be separated from previous line.

Check notice on line 68 in pbj-integration-tests/src/jmh/java/com/hedera/pbj/intergration/jmh/ComplexEqualsHashCodeBench.java

See this annotation in the file changed.

@codacy-production codacy-production / Codacy Static Code Analysis

pbj-integration-tests/src/jmh/java/com/hedera/pbj/intergration/jmh/ComplexEqualsHashCodeBench.java#L68

'VARIABLE_DEF' should be separated from previous line.

Check notice on line 45 in pbj-integration-tests/src/jmh/java/com/hedera/pbj/intergration/jmh/EqualsHashCodeBench.java

See this annotation in the file changed.

@codacy-production codacy-production / Codacy Static Code Analysis

pbj-integration-tests/src/jmh/java/com/hedera/pbj/intergration/jmh/EqualsHashCodeBench.java#L45

'VARIABLE_DEF' should be separated from previous line.

Check notice on line 46 in pbj-integration-tests/src/jmh/java/com/hedera/pbj/intergration/jmh/EqualsHashCodeBench.java

See this annotation in the file changed.

@codacy-production codacy-production / Codacy Static Code Analysis

pbj-integration-tests/src/jmh/java/com/hedera/pbj/intergration/jmh/EqualsHashCodeBench.java#L46

'VARIABLE_DEF' should be separated from previous line.

Check notice on line 47 in pbj-integration-tests/src/jmh/java/com/hedera/pbj/intergration/jmh/EqualsHashCodeBench.java

See this annotation in the file changed.

@codacy-production codacy-production / Codacy Static Code Analysis

pbj-integration-tests/src/jmh/java/com/hedera/pbj/intergration/jmh/EqualsHashCodeBench.java#L47

'VARIABLE_DEF' should be separated from previous line.

Check notice on line 82 in pbj-integration-tests/src/jmh/java/com/hedera/pbj/intergration/jmh/EqualsHashCodeBench.java

See this annotation in the file changed.

@codacy-production codacy-production / Codacy Static Code Analysis

pbj-integration-tests/src/jmh/java/com/hedera/pbj/intergration/jmh/EqualsHashCodeBench.java#L82

'METHOD_DEF' should be separated from previous line.

Check warning on line 21 in pbj-integration-tests/src/test/java/com/hedera/pbj/intergration/test/TestHashFunctions.java

See this annotation in the file changed.

@codacy-production codacy-production / Codacy Static Code Analysis

pbj-integration-tests/src/test/java/com/hedera/pbj/intergration/test/TestHashFunctions.java#L21

Avoid throwing raw exception types.

Check warning on line 91 in pbj-integration-tests/src/test/java/com/hedera/pbj/intergration/test/TestHashFunctions.java

See this annotation in the file changed.

@codacy-production codacy-production / Codacy Static Code Analysis

pbj-integration-tests/src/test/java/com/hedera/pbj/intergration/test/TestHashFunctions.java#L91

Avoid reassigning parameters such as 'val'