Skip to content

[Style]: format long lines#3884

Merged
shargon merged 2 commits intoneo-project:masterfrom
Wi1l-B0t:style.format-long-lines
Apr 8, 2025
Merged

[Style]: format long lines#3884
shargon merged 2 commits intoneo-project:masterfrom
Wi1l-B0t:style.format-long-lines

Conversation

@Wi1l-B0t
Copy link
Contributor

@Wi1l-B0t Wi1l-B0t commented Apr 5, 2025

Description

Just format some lines(comments or tests) that are too longs.

Fixes # (issue)

Type of change

  • Optimization (the change is only an optimization)
  • Style (the change is only a code style for better maintenance or standard purpose)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@Jim8y Jim8y requested a review from Copilot April 8, 2025 00:08
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.

Comments suppressed due to low confidence (4)

tests/Neo.UnitTests/SmartContract/UT_ContractParameterContext.cs:177

  • Using '[key.PublicKey, key2.PublicKey]' is not valid array syntax in C#. Replace it with 'new[] { key.PublicKey, key2.PublicKey }'.
var multiSignContract = Contract.CreateMultiSigContract(2, [key.PublicKey, key2.PublicKey]);

tests/Neo.UnitTests/SmartContract/UT_ContractParameterContext.cs:173

  • The literal '[0x01]' is not valid C# syntax for initializing a byte array. Use 'new byte[] { 0x01 }' instead.
Assert.IsFalse(context.AddSignature(multiSignContract, key3.PublicKey, [0x01]));

tests/Neo.UnitTests/ECC/UT_ECPoint.cs:147

  • The array literal '[0]' is not valid in C#. Use 'new byte[] { 0 }' instead.
byte[] result1 = [0];

tests/Neo.UnitTests/Cryptography/ECC/UT_ECPoint.cs:401

  • The syntax 'byte[] n = [1];' is invalid in C#. Please initialize the array using 'new byte[] { 1 }'.
byte[] n = [1];

@shargon shargon merged commit 4c06695 into neo-project:master Apr 8, 2025
12 of 13 checks passed
@Wi1l-B0t Wi1l-B0t deleted the style.format-long-lines branch April 9, 2025 12:11
Jim8y added a commit to Jim8y/neo that referenced this pull request Apr 9, 2025
* master: (163 commits)
  [style] Added some var styles (neo-project#3867)
  [`fix`] stop syncing on block 1465790 (neo-project#3888)
  Optimize block deserialization (neo-project#3879)
  Avoid double `ToArray` on `OnInvMessageReceived` (neo-project#3875)
  style: format long lines (neo-project#3884)
  optimize: return GetFileNameWithoutExtension(Path) if name is not set (neo-project#3883)
  Fix possible null exception (neo-project#3880)
  Remove linkedList (neo-project#3873)
  Optimize Uint160 and Uint256 constructor (neo-project#3872)
  Release the resources (neo-project#3868)
  [Clean] Remove `IRawReadOnlyStore` (neo-project#3869)
  move non-plugins out of plugins (neo-project#3863)
  feature: set name when create wallet (neo-project#3866)
  Native: swap Policy's `[get/set]AttributeFee` implementations (neo-project#3859)
  Fix: concurrent conflict in Cache.CopyTo (neo-project#3860)
  Fix: add default key parameter in help cmd (neo-project#3865)
  [Plugin UT] add more rpcserver UTs (neo-project#3864)
  config: upgrade NeoFS chains protocol configuration (neo-project#3858)
  [`Optimization`]: add exception message to `ArgumentException` (neo-project#3862)
  Native: unify arguments naming of CryptoLib's `verifyWith*` methods (neo-project#3855)
  ...

# Conflicts:
#	benchmarks/Neo.VM.Benchmarks/OpCode/Arrays/OpCode.ReverseN.cs
#	benchmarks/Neo.VM.Benchmarks/Program.cs
#	src/Neo/Neo.csproj
#	src/Neo/ProtocolSettings.cs
#	src/Neo/SmartContract/ApplicationEngine.cs
#	src/Neo/SmartContract/Native/NeoToken.cs
#	src/Neo/SmartContract/Native/RoleManagement.cs
#	tests/Neo.UnitTests/SmartContract/Manifest/UT_ContractManifest.cs
#	tests/Neo.UnitTests/SmartContract/Manifest/UT_ContractPermission.cs
#	tests/Neo.UnitTests/SmartContract/Native/UT_NativeContract.cs
#	tests/Neo.UnitTests/SmartContract/Native/UT_NeoToken.cs
#	tests/Neo.UnitTests/UT_ProtocolSettings.cs
#	tests/Neo.VM.Tests/UT_ReferenceCounter.cs
cschuchardt88 pushed a commit to cschuchardt88/neo that referenced this pull request Jun 8, 2025
Co-authored-by: Shargon <shargon@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants