Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Break change transaction #99

Merged
merged 2 commits into from
Apr 12, 2023
Merged

Break change transaction #99

merged 2 commits into from
Apr 12, 2023

Conversation

GrapeBaBa
Copy link
Owner

No description provided.

Signed-off-by: grapebaba <281165273@qq.com>
Signed-off-by: grapebaba <281165273@qq.com>

public static GasCoin bcsDeserialize(byte[] input) throws com.novi.serde.DeserializationError {
if (input == null) {
throw new com.novi.serde.DeserializationError("Cannot deserialize null array");
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

7% of developers fix this issue

UnnecessarilyFullyQualified: This fully qualified name is unambiguous to the compiler if imported.


Suggested change
throw new com.novi.serde.DeserializationError("Cannot deserialize null array");
public static GasCoin deserialize(com.novi.serde.Deserializer deserializer) throws DeserializationError {

❗❗ 270 similar findings have been found in this PR

🔎 Expand here to view all instances of this finding
File Path Line Number
src/main/java/io/sui/bcsgen/UID.java 49
src/main/java/io/sui/bcsgen/MovePackage.java 8
src/main/java/io/sui/bcsgen/Coin.java 23
src/main/java/io/sui/bcsgen/TypeOrigin.java 26
src/main/java/io/sui/bcsgen/TraitHelpers.java 21
src/main/java/io/sui/bcsgen/PackageUpgradeError.java 178
src/main/java/io/sui/bcsgen/TraitHelpers.java 393
src/main/java/io/sui/bcsgen/PackageUpgradeError.java 176
src/main/java/io/sui/bcsgen/ChangeEpoch.java 108
src/main/java/io/sui/bcsgen/TraitHelpers.java 187

Showing 10 of 270 findings. Visit the Lift Web Console to see all.


ℹ️ Expand to see all @sonatype-lift commands

You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.

Command Usage
@sonatype-lift ignore Leave out the above finding from this PR
@sonatype-lift ignoreall Leave out all the existing findings from this PR
@sonatype-lift exclude <file|issue|path|tool> Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file

Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.


Help us improve LIFT! (Sonatype LiftBot external survey)

Was this a good recommendation for you? Answering this survey will not impact your Lift settings.

[ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ]

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sonatype-lift ignore

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've recorded these 271 issues as ignored for this pull request.
If you change your mind, just comment @sonatype-lift unignore.

}

private Function<TransactionBytes, CompletableFuture<ExecuteTransactionResponse>>
private Function<TransactionBytes, CompletableFuture<TransactionBlockResponse>>
signAndExecuteTransactionFunction(
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

18% of developers fix this issue

UnusedMethod: Method 'signAndExecuteTransactionFunction' is never used.

❗❗ 4 similar findings have been found in this PR

🔎 Expand here to view all instances of this finding
File Path Line Number
src/main/java/io/sui/clients/LocalTransactionBuilder.java 1510
src/main/java/io/sui/clients/LocalTransactionBuilder.java 1196
src/main/java/io/sui/clients/LocalTransactionBuilder.java 1482
src/main/java/io/sui/clients/LocalTransactionBuilder.java 1536

Visit the Lift Web Console to find more details in your report.


ℹ️ Expand to see all @sonatype-lift commands

You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.

Command Usage
@sonatype-lift ignore Leave out the above finding from this PR
@sonatype-lift ignoreall Leave out all the existing findings from this PR
@sonatype-lift exclude <file|issue|path|tool> Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file

Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.


Help us improve LIFT! (Sonatype LiftBot external survey)

Was this a good recommendation for you? Answering this survey will not impact your Lift settings.

[ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ]

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sonatype-lift ignoreall

super(
String.format(
"Mismatched Object argument kind for object %s. %s is not compatible with %s",
id, old, objectArg));
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ObjectToString: ObjectID is final and does not override Object.toString, so converting it to a string will print its identity (e.g. ObjectID@4488aabb) instead of useful information.


ℹ️ Expand to see all @sonatype-lift commands

You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.

Command Usage
@sonatype-lift ignore Leave out the above finding from this PR
@sonatype-lift ignoreall Leave out all the existing findings from this PR
@sonatype-lift exclude <file|issue|path|tool> Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file

Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.


Help us improve LIFT! (Sonatype LiftBot external survey)

Was this a good recommendation for you? Answering this survey will not impact your Lift settings.

[ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ]

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sonatype-lift ignoreall


@Override
public String toString() {
return "ObjectBuilderArg{" + "objectID=" + id + '}';
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ObjectToString: ObjectID is final and does not override Object.toString, so converting it to a string will print its identity (e.g. ObjectID@4488aabb) instead of useful information.


ℹ️ Expand to see all @sonatype-lift commands

You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.

Command Usage
@sonatype-lift ignore Leave out the above finding from this PR
@sonatype-lift ignoreall Leave out all the existing findings from this PR
@sonatype-lift exclude <file|issue|path|tool> Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file

Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.


Help us improve LIFT! (Sonatype LiftBot external survey)

Was this a good recommendation for you? Answering this survey will not impact your Lift settings.

[ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ]

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sonatype-lift ignoreall

.thenCompose(
(Function<Argument, CompletableFuture<TransactionBlockResponse>>)
argument -> {
SuiAddress.Builder recipientAddressBuilder = new Builder();
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

22% of developers fix this issue

BadImport: Importing nested classes/static methods/static fields with commonly-used names can make code harder to read, because it may not be clear from the context exactly which type is being referred to. Qualifying the name with that of the containing class can make the code clearer. Here we recommend using qualified class: SuiAddress.


Suggested change
SuiAddress.Builder recipientAddressBuilder = new Builder();
SuiAddress.Builder recipientAddressBuilder = new SuiAddress.Builder();

❗❗ 2 similar findings have been found in this PR

🔎 Expand here to view all instances of this finding
File Path Line Number
src/main/java/io/sui/clients/LocalTransactionBuilder.java 463
src/main/java/io/sui/clients/ProgrammableTransactionBuilder.java 98

Visit the Lift Web Console to find more details in your report.


ℹ️ Expand to see all @sonatype-lift commands

You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.

Command Usage
@sonatype-lift ignore Leave out the above finding from this PR
@sonatype-lift ignoreall Leave out all the existing findings from this PR
@sonatype-lift exclude <file|issue|path|tool> Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file

Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.


Help us improve LIFT! (Sonatype LiftBot external survey)

Was this a good recommendation for you? Answering this survey will not impact your Lift settings.

[ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ]

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sonatype-lift ignoreall

*
* @param moveModule the move module
*/
public void setMoveModule(io.sui.models.objects.MoveModule moveModule) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

26% of developers fix this issue

InconsistentCapitalization: Found the field 'MoveModule' with the same name as the parameter 'moveModule' but with different capitalization.


Suggested change
public void setMoveModule(io.sui.models.objects.MoveModule moveModule) {
public void setMoveModule(io.sui.models.objects.MoveModule MoveModule) {

❗❗ 3 similar findings have been found in this PR

🔎 Expand here to view all instances of this finding
File Path Line Number
src/main/java/io/sui/models/transactions/TransactionFilter.java 144
src/main/java/io/sui/models/events/EventQuery.java 105
src/main/java/io/sui/models/objects/ObjectDataFilter.java 145

Visit the Lift Web Console to find more details in your report.


ℹ️ Expand to see all @sonatype-lift commands

You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.

Command Usage
@sonatype-lift ignore Leave out the above finding from this PR
@sonatype-lift ignoreall Leave out all the existing findings from this PR
@sonatype-lift exclude <file|issue|path|tool> Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file

Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.


Help us improve LIFT! (Sonatype LiftBot external survey)

Was this a good recommendation for you? Answering this survey will not impact your Lift settings.

[ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ]

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sonatype-lift ignoreall


/** The type Move function query. */
class MoveFunctionQuery implements TransactionQuery {
public static class MoveFunctionFilter extends TransactionFilter {

@SuppressWarnings("checkstyle:MemberName")
private MoveFunction MoveFunction;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

14% of developers fix this issue

VariableNameSameAsType: Variable named MoveFunction has the type MoveFunction. Calling methods using "MoveFunction.something" are difficult to distinguish between static and instance methods.


ℹ️ Expand to see all @sonatype-lift commands

You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.

Command Usage
@sonatype-lift ignore Leave out the above finding from this PR
@sonatype-lift ignoreall Leave out all the existing findings from this PR
@sonatype-lift exclude <file|issue|path|tool> Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file

Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.


Help us improve LIFT! (Sonatype LiftBot external survey)

Was this a good recommendation for you? Answering this survey will not impact your Lift settings.

[ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ]

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sonatype-lift ignoreall

public static class MoveModuleFilter extends ObjectDataFilter {

@SuppressWarnings("checkstyle:MemberName")
private MoveModule MoveModule;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

14% of developers fix this issue

VariableNameSameAsType: Variable named MoveModule has the type MoveModule. Calling methods using "MoveModule.something" are difficult to distinguish between static and instance methods.


ℹ️ Expand to see all @sonatype-lift commands

You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.

Command Usage
@sonatype-lift ignore Leave out the above finding from this PR
@sonatype-lift ignoreall Leave out all the existing findings from this PR
@sonatype-lift exclude <file|issue|path|tool> Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file

Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.


Help us improve LIFT! (Sonatype LiftBot external survey)

Was this a good recommendation for you? Answering this survey will not impact your Lift settings.

[ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ]

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sonatype-lift ignoreall

@sonatype-lift
Copy link

sonatype-lift bot commented Apr 12, 2023

🛠 Lift Auto-fix

Some of the Lift findings in this PR can be automatically fixed. You can download and apply these changes in your local project directory of your branch to review the suggestions before committing.1

# Download the patch
curl https://lift.sonatype.com/api/patch/github.com/GrapeBaBa/sui4j/99.diff -o lift-autofixes.diff

# Apply the patch with git
git apply lift-autofixes.diff

# Review the changes
git diff

Want it all in a single command? Open a terminal in your project's directory and copy and paste the following command:

curl https://lift.sonatype.com/api/patch/github.com/GrapeBaBa/sui4j/99.diff | git apply

Once you're satisfied, commit and push your changes in your project.

Footnotes

  1. You can preview the patch by opening the patch URL in the browser.

@GrapeBaBa
Copy link
Owner Author

@sonatype-lift ignoreall

@GrapeBaBa GrapeBaBa merged commit f368a8b into main Apr 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant