From badd0902073cf0aa73a7fc01619acb0693591036 Mon Sep 17 00:00:00 2001 From: Supun Setunga Date: Wed, 8 Nov 2023 12:36:40 -0800 Subject: [PATCH] Ignore lint for deprectaed types --- migrations/account_type/migration.go | 24 +++++++++--------- migrations/account_type/migration_test.go | 30 +++++++++++------------ 2 files changed, 27 insertions(+), 27 deletions(-) diff --git a/migrations/account_type/migration.go b/migrations/account_type/migration.go index cdd68592bd..885d5718e6 100644 --- a/migrations/account_type/migration.go +++ b/migrations/account_type/migration.go @@ -285,33 +285,33 @@ func (m *AccountTypeMigration) maybeConvertAccountType(staticType interpreter.St default: // Is it safe to do so? switch staticType { - case interpreter.PrimitiveStaticTypePublicAccount: + case interpreter.PrimitiveStaticTypePublicAccount: //nolint:staticcheck return unauthorizedAccountReferenceType - case interpreter.PrimitiveStaticTypeAuthAccount: + case interpreter.PrimitiveStaticTypeAuthAccount: //nolint:staticcheck return authAccountReferenceType - case interpreter.PrimitiveStaticTypeAuthAccountCapabilities, - interpreter.PrimitiveStaticTypePublicAccountCapabilities: + case interpreter.PrimitiveStaticTypeAuthAccountCapabilities, //nolint:staticcheck + interpreter.PrimitiveStaticTypePublicAccountCapabilities: //nolint:staticcheck return interpreter.PrimitiveStaticTypeAccount_Capabilities - case interpreter.PrimitiveStaticTypeAuthAccountAccountCapabilities: + case interpreter.PrimitiveStaticTypeAuthAccountAccountCapabilities: //nolint:staticcheck return interpreter.PrimitiveStaticTypeAccount_AccountCapabilities - case interpreter.PrimitiveStaticTypeAuthAccountStorageCapabilities: + case interpreter.PrimitiveStaticTypeAuthAccountStorageCapabilities: //nolint:staticcheck return interpreter.PrimitiveStaticTypeAccount_StorageCapabilities - case interpreter.PrimitiveStaticTypeAuthAccountContracts, - interpreter.PrimitiveStaticTypePublicAccountContracts: + case interpreter.PrimitiveStaticTypeAuthAccountContracts, //nolint:staticcheck + interpreter.PrimitiveStaticTypePublicAccountContracts: //nolint:staticcheck return interpreter.PrimitiveStaticTypeAccount_Contracts - case interpreter.PrimitiveStaticTypeAuthAccountKeys, - interpreter.PrimitiveStaticTypePublicAccountKeys: + case interpreter.PrimitiveStaticTypeAuthAccountKeys, //nolint:staticcheck + interpreter.PrimitiveStaticTypePublicAccountKeys: //nolint:staticcheck return interpreter.PrimitiveStaticTypeAccount_Keys - case interpreter.PrimitiveStaticTypeAuthAccountInbox: + case interpreter.PrimitiveStaticTypeAuthAccountInbox: //nolint:staticcheck return interpreter.PrimitiveStaticTypeAccount_Inbox - case interpreter.PrimitiveStaticTypeAccountKey: + case interpreter.PrimitiveStaticTypeAccountKey: //nolint:staticcheck return interpreter.AccountKeyStaticType } } diff --git a/migrations/account_type/migration_test.go b/migrations/account_type/migration_test.go index b77e32f822..9c5dde2604 100644 --- a/migrations/account_type/migration_test.go +++ b/migrations/account_type/migration_test.go @@ -72,8 +72,8 @@ func TestMigration(t *testing.T) { account := common.Address{0x42} pathDomain := common.PathDomainPublic - const publicAccountType = interpreter.PrimitiveStaticTypePublicAccount - const authAccountType = interpreter.PrimitiveStaticTypeAuthAccount + const publicAccountType = interpreter.PrimitiveStaticTypePublicAccount //nolint:staticcheck + const authAccountType = interpreter.PrimitiveStaticTypeAuthAccount //nolint:staticcheck const stringType = interpreter.PrimitiveStaticTypeString type testCase struct { @@ -91,43 +91,43 @@ func TestMigration(t *testing.T) { expectedType: authAccountReferenceType, }, "auth_account_capabilities": { - storedType: interpreter.PrimitiveStaticTypeAuthAccountCapabilities, + storedType: interpreter.PrimitiveStaticTypeAuthAccountCapabilities, //nolint:staticcheck expectedType: interpreter.PrimitiveStaticTypeAccount_Capabilities, }, "public_account_capabilities": { - storedType: interpreter.PrimitiveStaticTypePublicAccountCapabilities, + storedType: interpreter.PrimitiveStaticTypePublicAccountCapabilities, //nolint:staticcheck expectedType: interpreter.PrimitiveStaticTypeAccount_Capabilities, }, "auth_account_account_capabilities": { - storedType: interpreter.PrimitiveStaticTypeAuthAccountAccountCapabilities, + storedType: interpreter.PrimitiveStaticTypeAuthAccountAccountCapabilities, //nolint:staticcheck expectedType: interpreter.PrimitiveStaticTypeAccount_AccountCapabilities, }, "auth_account_storage_capabilities": { - storedType: interpreter.PrimitiveStaticTypeAuthAccountStorageCapabilities, + storedType: interpreter.PrimitiveStaticTypeAuthAccountStorageCapabilities, //nolint:staticcheck expectedType: interpreter.PrimitiveStaticTypeAccount_StorageCapabilities, }, "auth_account_contracts": { - storedType: interpreter.PrimitiveStaticTypeAuthAccountContracts, + storedType: interpreter.PrimitiveStaticTypeAuthAccountContracts, //nolint:staticcheck expectedType: interpreter.PrimitiveStaticTypeAccount_Contracts, }, "public_account_contracts": { - storedType: interpreter.PrimitiveStaticTypePublicAccountContracts, + storedType: interpreter.PrimitiveStaticTypePublicAccountContracts, //nolint:staticcheck expectedType: interpreter.PrimitiveStaticTypeAccount_Contracts, }, "auth_account_keys": { - storedType: interpreter.PrimitiveStaticTypeAuthAccountKeys, + storedType: interpreter.PrimitiveStaticTypeAuthAccountKeys, //nolint:staticcheck expectedType: interpreter.PrimitiveStaticTypeAccount_Keys, }, "public_account_keys": { - storedType: interpreter.PrimitiveStaticTypePublicAccountKeys, + storedType: interpreter.PrimitiveStaticTypePublicAccountKeys, //nolint:staticcheck expectedType: interpreter.PrimitiveStaticTypeAccount_Keys, }, "auth_account_inbox": { - storedType: interpreter.PrimitiveStaticTypeAuthAccountInbox, + storedType: interpreter.PrimitiveStaticTypeAuthAccountInbox, //nolint:staticcheck expectedType: interpreter.PrimitiveStaticTypeAccount_Inbox, }, "account_key": { - storedType: interpreter.PrimitiveStaticTypeAccountKey, + storedType: interpreter.PrimitiveStaticTypeAccountKey, //nolint:staticcheck expectedType: interpreter.AccountKeyStaticType, }, "optional_account": { @@ -426,7 +426,7 @@ func TestNestedTypeValueMigration(t *testing.T) { expectedValue interpreter.Value } - storedAccountTypeValue := interpreter.NewTypeValue(nil, interpreter.PrimitiveStaticTypePublicAccount) + storedAccountTypeValue := interpreter.NewTypeValue(nil, interpreter.PrimitiveStaticTypePublicAccount) //nolint:staticcheck expectedAccountTypeValue := interpreter.NewTypeValue(nil, unauthorizedAccountReferenceType) stringTypeValue := interpreter.NewTypeValue(nil, interpreter.PrimitiveStaticTypeString) @@ -547,7 +547,7 @@ func TestNestedTypeValueMigration(t *testing.T) { interpreter.NewTypeValue( nil, dummyStaticType{ - PrimitiveStaticType: interpreter.PrimitiveStaticTypePublicAccount, + PrimitiveStaticType: interpreter.PrimitiveStaticTypePublicAccount, //nolint:staticcheck }, ), interpreter.NewUnmeteredInt8Value(4), @@ -576,7 +576,7 @@ func TestNestedTypeValueMigration(t *testing.T) { interpreter.NewTypeValue( nil, dummyStaticType{ - PrimitiveStaticType: interpreter.PrimitiveStaticTypePublicAccount, + PrimitiveStaticType: interpreter.PrimitiveStaticTypePublicAccount, //nolint:staticcheck }, ), storedAccountTypeValue,