Skip to content

Commit

Permalink
fix(general): linting issue fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
deepanshutr committed Nov 21, 2022
1 parent 90acf18 commit 4a310fb
Show file tree
Hide file tree
Showing 45 changed files with 244 additions and 183 deletions.
1 change: 1 addition & 0 deletions CODING_GUIDELINES.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ In other words: we define a use case input, current state and the expected outco
> And a sell order for 20 shares of MSFT stock should have been executed
*

Reference: [writing acceptance tests](https://openclassrooms.com/en/courses/4544611-write-agile-documentation-user-stories-acceptance-tests/4810081-writing-acceptance-tests)*
.

Expand Down
8 changes: 4 additions & 4 deletions RELEASE_PROCESS.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,10 +169,10 @@ Release Exception*.
Correct [v0.43](https://github.com/persistenceone/persistence-sdk/milestone/26) to the issue.
2. Add a comment to the issue and ensure it contains the following information (see the bug template below):

* **[Impact]** An explanation of the bug on users and justification for backporting the fix to the stable release.
* A **[Test Case]** section containing detailed instructions on how to reproduce the bug.
* A **[Regression Potential]** section with a clear assessment on how regressions are most likely to manifest as a
result of the pull request that aims to fix the bug in the target stable release.
* **[Impact]** An explanation of the bug on users and justification for backporting the fix to the stable release.
* A **[Test Case]** section containing detailed instructions on how to reproduce the bug.
* A **[Regression Potential]** section with a clear assessment on how regressions are most likely to manifest as a
result of the pull request that aims to fix the bug in the target stable release.

3. **Stable Release Managers** will review and discuss the PR. Once *consensus* surrounding the rationale has been
reached and the technical review has successfully concluded, the pull request will be merged in the respective
Expand Down
10 changes: 6 additions & 4 deletions modules/assets/internal/mappable/mappable_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@
package mappable

import (
"reflect"
"testing"

"github.com/cosmos/cosmos-sdk/codec"
"github.com/stretchr/testify/require"

"github.com/AssetMantle/modules/modules/assets/internal/key"
baseData "github.com/AssetMantle/modules/schema/data/base"
documentsSchema "github.com/AssetMantle/modules/schema/documents"
Expand All @@ -15,10 +21,6 @@ import (
baseProperties "github.com/AssetMantle/modules/schema/properties/base"
"github.com/AssetMantle/modules/schema/qualified"
baseQualified "github.com/AssetMantle/modules/schema/qualified/base"
"github.com/cosmos/cosmos-sdk/codec"
"github.com/stretchr/testify/require"
"reflect"
"testing"
)

func createTestInput() (ids.ClassificationID, qualified.Immutables, qualified.Mutables, mappable) {
Expand Down
8 changes: 5 additions & 3 deletions modules/assets/internal/parameters/dummy/validator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@
package dummy

import (
"testing"

sdkTypes "github.com/cosmos/cosmos-sdk/types"

baseData "github.com/AssetMantle/modules/schema/data/base"
errorConstants "github.com/AssetMantle/modules/schema/errors/constants"
baseIDs "github.com/AssetMantle/modules/schema/ids/base"
baseTypes "github.com/AssetMantle/modules/schema/parameters/base"
sdkTypes "github.com/cosmos/cosmos-sdk/types"
"testing"
)

func Test_validator(t *testing.T) {
Expand All @@ -30,7 +32,7 @@ func Test_validator(t *testing.T) {
{"-ve with different type of Data", args{baseData.NewStringData("stringData")}, errorConstants.IncorrectFormat},
{"-ve InvalidParameter", args{baseTypes.NewParameter(baseIDs.NewStringID(""), baseData.NewStringData(""), validator)}, errorConstants.InvalidParameter},
{"-ve with -ve decData", args{baseTypes.NewParameter(baseIDs.NewStringID("ID"), baseData.NewDecData(sdkTypes.NewDec(-1)), validator)}, errorConstants.InvalidParameter},
{"+ve with +ve decData", args{baseTypes.NewParameter(baseIDs.NewStringID("ID"), baseData.NewDecData(sdkTypes.NewDec(1)), validator)}, nil}, //TODO: Check whether input provided is right
{"+ve with +ve decData", args{baseTypes.NewParameter(baseIDs.NewStringID("ID"), baseData.NewDecData(sdkTypes.NewDec(1)), validator)}, nil}, // TODO: Check whether input provided is right
{"-ve nil", args{}, errorConstants.IncorrectFormat},
}
for _, tt := range tests {
Expand Down
3 changes: 2 additions & 1 deletion modules/classifications/auxiliaries/define/keeper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@
package define

import (
baseDocuments "github.com/AssetMantle/modules/schema/documents/base"
"reflect"
"testing"

baseDocuments "github.com/AssetMantle/modules/schema/documents/base"

"github.com/cosmos/cosmos-sdk/codec"
"github.com/cosmos/cosmos-sdk/store"
sdkTypes "github.com/cosmos/cosmos-sdk/types"
Expand Down
3 changes: 2 additions & 1 deletion modules/classifications/internal/genesis/prototype_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@
package genesis

import (
"github.com/AssetMantle/modules/schema/documents/constants"
"testing"

"github.com/AssetMantle/modules/schema/documents/constants"

"github.com/stretchr/testify/require"

"github.com/AssetMantle/modules/modules/classifications/internal/key"
Expand Down
10 changes: 6 additions & 4 deletions modules/classifications/internal/mappable/mappable_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@
package mappable

import (
"reflect"
"testing"

"github.com/cosmos/cosmos-sdk/codec"
"github.com/stretchr/testify/require"

"github.com/AssetMantle/modules/modules/classifications/internal/key"
baseData "github.com/AssetMantle/modules/schema/data/base"
documentsSchema "github.com/AssetMantle/modules/schema/documents"
Expand All @@ -15,10 +21,6 @@ import (
baseProperties "github.com/AssetMantle/modules/schema/properties/base"
"github.com/AssetMantle/modules/schema/qualified"
baseQualified "github.com/AssetMantle/modules/schema/qualified/base"
"github.com/cosmos/cosmos-sdk/codec"
"github.com/stretchr/testify/require"
"reflect"
"testing"
)

func createTestInput() (ids.ClassificationID, qualified.Immutables, qualified.Mutables, mappable) {
Expand Down
24 changes: 13 additions & 11 deletions modules/identities/auxiliaries/authenticate/keeper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,19 @@ package authenticate

import (
"fmt"
"reflect"
"testing"

"github.com/cosmos/cosmos-sdk/codec"
"github.com/cosmos/cosmos-sdk/store"
"github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/x/auth/vesting"
"github.com/cosmos/cosmos-sdk/x/params"
"github.com/stretchr/testify/require"
abciTypes "github.com/tendermint/tendermint/abci/types"
"github.com/tendermint/tendermint/libs/log"
tendermintDB "github.com/tendermint/tm-db"

"github.com/AssetMantle/modules/modules/identities/internal/key"
"github.com/AssetMantle/modules/modules/identities/internal/mappable"
"github.com/AssetMantle/modules/modules/identities/internal/parameters"
Expand All @@ -18,17 +31,6 @@ import (
baseLists "github.com/AssetMantle/modules/schema/lists/base"
baseProperties "github.com/AssetMantle/modules/schema/properties/base"
baseQualified "github.com/AssetMantle/modules/schema/qualified/base"
"github.com/cosmos/cosmos-sdk/codec"
"github.com/cosmos/cosmos-sdk/store"
"github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/x/auth/vesting"
"github.com/cosmos/cosmos-sdk/x/params"
"github.com/stretchr/testify/require"
abciTypes "github.com/tendermint/tendermint/abci/types"
"github.com/tendermint/tendermint/libs/log"
tendermintDB "github.com/tendermint/tm-db"
"reflect"
"testing"
)

var (
Expand Down
8 changes: 5 additions & 3 deletions modules/identities/auxiliaries/authenticate/request_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,18 @@
package authenticate

import (
"reflect"
"testing"

"github.com/cosmos/cosmos-sdk/types"

baseData "github.com/AssetMantle/modules/schema/data/base"
"github.com/AssetMantle/modules/schema/helpers"
"github.com/AssetMantle/modules/schema/ids"
baseIDs "github.com/AssetMantle/modules/schema/ids/base"
baseLists "github.com/AssetMantle/modules/schema/lists/base"
baseProperties "github.com/AssetMantle/modules/schema/properties/base"
baseQualified "github.com/AssetMantle/modules/schema/qualified/base"
"github.com/cosmos/cosmos-sdk/types"
"reflect"
"testing"
)

var (
Expand Down
6 changes: 4 additions & 2 deletions modules/identities/internal/mappable/mappable_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,13 @@
package mappable

import (
"github.com/stretchr/testify/require"
"reflect"
"testing"

"github.com/stretchr/testify/require"

"github.com/cosmos/cosmos-sdk/codec"

"github.com/AssetMantle/modules/modules/identities/internal/key"
baseData "github.com/AssetMantle/modules/schema/data/base"
"github.com/AssetMantle/modules/schema/documents"
Expand All @@ -19,7 +22,6 @@ import (
baseProperties "github.com/AssetMantle/modules/schema/properties/base"
"github.com/AssetMantle/modules/schema/qualified"
baseQualified "github.com/AssetMantle/modules/schema/qualified/base"
"github.com/cosmos/cosmos-sdk/codec"
)

func createTestInput() (documents.Identity, ids.ClassificationID, qualified.Immutables, qualified.Mutables) {
Expand Down
24 changes: 13 additions & 11 deletions modules/identities/internal/queries/identity/keeper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,19 @@ package identity

import (
"fmt"
"reflect"
"testing"

"github.com/cosmos/cosmos-sdk/codec"
"github.com/cosmos/cosmos-sdk/store"
"github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/x/auth/vesting"
"github.com/cosmos/cosmos-sdk/x/params"
"github.com/stretchr/testify/require"
abciTypes "github.com/tendermint/tendermint/abci/types"
"github.com/tendermint/tendermint/libs/log"
tendermintDB "github.com/tendermint/tm-db"

"github.com/AssetMantle/modules/modules/identities/internal/key"
"github.com/AssetMantle/modules/modules/identities/internal/mappable"
"github.com/AssetMantle/modules/modules/identities/internal/parameters"
Expand All @@ -17,17 +30,6 @@ import (
baseLists "github.com/AssetMantle/modules/schema/lists/base"
baseProperties "github.com/AssetMantle/modules/schema/properties/base"
baseQualified "github.com/AssetMantle/modules/schema/qualified/base"
"github.com/cosmos/cosmos-sdk/codec"
"github.com/cosmos/cosmos-sdk/store"
"github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/x/auth/vesting"
"github.com/cosmos/cosmos-sdk/x/params"
"github.com/stretchr/testify/require"
abciTypes "github.com/tendermint/tendermint/abci/types"
"github.com/tendermint/tendermint/libs/log"
tendermintDB "github.com/tendermint/tm-db"
"reflect"
"testing"
)

type TestKeepers struct {
Expand Down
24 changes: 13 additions & 11 deletions modules/identities/internal/transactions/define/keeper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,19 @@ package define

import (
"fmt"
"reflect"
"testing"

"github.com/cosmos/cosmos-sdk/codec"
"github.com/cosmos/cosmos-sdk/store"
sdkTypes "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/x/auth/vesting"
"github.com/cosmos/cosmos-sdk/x/params"
"github.com/stretchr/testify/require"
abciTypes "github.com/tendermint/tendermint/abci/types"
"github.com/tendermint/tendermint/libs/log"
tendermintDB "github.com/tendermint/tm-db"

"github.com/AssetMantle/modules/modules/classifications/auxiliaries/define"
"github.com/AssetMantle/modules/modules/identities/auxiliaries/authenticate"
"github.com/AssetMantle/modules/modules/identities/internal/key"
Expand All @@ -22,17 +35,6 @@ import (
baseLists "github.com/AssetMantle/modules/schema/lists/base"
baseProperties "github.com/AssetMantle/modules/schema/properties/base"
baseQualified "github.com/AssetMantle/modules/schema/qualified/base"
"github.com/cosmos/cosmos-sdk/codec"
"github.com/cosmos/cosmos-sdk/store"
sdkTypes "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/x/auth/vesting"
"github.com/cosmos/cosmos-sdk/x/params"
"github.com/stretchr/testify/require"
abciTypes "github.com/tendermint/tendermint/abci/types"
"github.com/tendermint/tendermint/libs/log"
tendermintDB "github.com/tendermint/tm-db"
"reflect"
"testing"
)

type TestKeepers struct {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ package define

import (
"encoding/json"
"github.com/AssetMantle/modules/schema/lists/utilities"
"reflect"
"testing"

"github.com/AssetMantle/modules/schema/lists/utilities"

"github.com/stretchr/testify/require"

"github.com/AssetMantle/modules/schema"
Expand Down
24 changes: 13 additions & 11 deletions modules/identities/internal/transactions/deputize/keeper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,19 @@ package deputize

import (
"fmt"
"reflect"
"testing"

"github.com/cosmos/cosmos-sdk/codec"
"github.com/cosmos/cosmos-sdk/store"
"github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/x/auth/vesting"
"github.com/cosmos/cosmos-sdk/x/params"
"github.com/stretchr/testify/require"
abciTypes "github.com/tendermint/tendermint/abci/types"
"github.com/tendermint/tendermint/libs/log"
tendermintDB "github.com/tendermint/tm-db"

"github.com/AssetMantle/modules/modules/identities/auxiliaries/authenticate"
"github.com/AssetMantle/modules/modules/identities/internal/key"
"github.com/AssetMantle/modules/modules/identities/internal/mappable"
Expand All @@ -19,17 +32,6 @@ import (
baseLists "github.com/AssetMantle/modules/schema/lists/base"
baseProperties "github.com/AssetMantle/modules/schema/properties/base"
baseQualified "github.com/AssetMantle/modules/schema/qualified/base"
"github.com/cosmos/cosmos-sdk/codec"
"github.com/cosmos/cosmos-sdk/store"
"github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/x/auth/vesting"
"github.com/cosmos/cosmos-sdk/x/params"
"github.com/stretchr/testify/require"
abciTypes "github.com/tendermint/tendermint/abci/types"
"github.com/tendermint/tendermint/libs/log"
tendermintDB "github.com/tendermint/tm-db"
"reflect"
"testing"
)

type TestKeepers struct {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@
package deputize

import (
"github.com/AssetMantle/modules/schema/lists/utilities"
"reflect"
"testing"

"github.com/AssetMantle/modules/schema/lists/utilities"

"github.com/cosmos/cosmos-sdk/codec"
sdkTypes "github.com/cosmos/cosmos-sdk/types"
"github.com/stretchr/testify/require"
Expand Down
24 changes: 13 additions & 11 deletions modules/identities/internal/transactions/issue/keeper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,19 @@ package issue

import (
"fmt"
"reflect"
"testing"

"github.com/cosmos/cosmos-sdk/codec"
"github.com/cosmos/cosmos-sdk/store"
"github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/x/auth/vesting"
"github.com/cosmos/cosmos-sdk/x/params"
"github.com/stretchr/testify/require"
abciTypes "github.com/tendermint/tendermint/abci/types"
"github.com/tendermint/tendermint/libs/log"
tendermintDB "github.com/tendermint/tm-db"

"github.com/AssetMantle/modules/modules/classifications/auxiliaries/conform"
"github.com/AssetMantle/modules/modules/identities/auxiliaries/authenticate"
"github.com/AssetMantle/modules/modules/identities/internal/key"
Expand All @@ -21,17 +34,6 @@ import (
baseLists "github.com/AssetMantle/modules/schema/lists/base"
baseProperties "github.com/AssetMantle/modules/schema/properties/base"
baseQualified "github.com/AssetMantle/modules/schema/qualified/base"
"github.com/cosmos/cosmos-sdk/codec"
"github.com/cosmos/cosmos-sdk/store"
"github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/x/auth/vesting"
"github.com/cosmos/cosmos-sdk/x/params"
"github.com/stretchr/testify/require"
abciTypes "github.com/tendermint/tendermint/abci/types"
"github.com/tendermint/tendermint/libs/log"
tendermintDB "github.com/tendermint/tm-db"
"reflect"
"testing"
)

type TestKeepers struct {
Expand Down
Loading

0 comments on commit 4a310fb

Please sign in to comment.