-
Notifications
You must be signed in to change notification settings - Fork 103
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
style: update golangci config and fix lint errors #1384
Conversation
@@ -1,4 +1,4 @@ | |||
package grpc_gateway | |||
package grpcgateway |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
breaking change
// ToAPI converts to pulsar based data structure | ||
func (d *DateCriteria) ToAPI() *api.DateCriteria { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
breaking change
// QueryProjectsByReferenceIDCmd returns command that retrieves list of projects by reference id with pagination. | ||
func QueryProjectsByReferenceIDCmd() *cobra.Command { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
breaking change
@@ -23,7 +23,7 @@ import ( | |||
const ( | |||
FlagAddIssuers string = "add-issuers" | |||
FlagRemoveIssuers string = "remove-issuers" | |||
FlagReferenceId string = "reference-id" | |||
FlagReferenceID string = "reference-id" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
breaking change
@@ -8,7 +8,7 @@ import ( | |||
"github.com/regen-network/regen-ledger/x/ecocredit" | |||
) | |||
|
|||
const MaxReferenceIdLength = 32 | |||
const MaxReferenceIDLength = 32 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
breaking change
RegexClassID = `[A-Z]{1,3}[0-9]{2,}` | ||
RegexProjectID = fmt.Sprintf(`%s-[A-Z0-9]{2,}`, RegexClassID) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
breaking change
@@ -58,24 +56,24 @@ var ( | |||
// least three digits | |||
// | |||
// e.g. C01 | |||
func FormatClassId(creditTypeAbbreviation string, classSeqNo uint64) string { | |||
func FormatClassID(creditTypeAbbreviation string, classSeqNo uint64) string { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
breaking change
// <project-sequence> is the sequence number of the project, padded to at least | ||
// three digits | ||
// | ||
// e.g. C01-001 | ||
func FormatProjectId(classId string, projectSeqNo uint64) string { | ||
return fmt.Sprintf("%s-%03d", classId, projectSeqNo) | ||
func FormatProjectID(classID string, projectSeqNo uint64) string { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
breaking change
if classId == "" { | ||
// ValidateClassID validates a class ID conforms to the format described in | ||
// FormatClassID. The return is nil if the ID is valid. | ||
func ValidateClassID(classID string) error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
breaking change
if projectId == "" { | ||
// ValidateProjectID validates a project ID conforms to the format described | ||
// in FormatProjectID. The return is nil if the ID is valid. | ||
func ValidateProjectID(projectID string) error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
breaking change
// GetClassIdFromProjectId returns the credit class ID in a project ID. | ||
func GetClassIdFromProjectId(projectId string) string { | ||
// GetClassIDFromProjectID returns the credit class ID in a project ID. | ||
func GetClassIDFromProjectID(projectID string) string { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
breaking change
// GetClassIdFromBatchDenom returns the credit class ID in a batch denom. | ||
func GetClassIdFromBatchDenom(denom string) string { | ||
// GetClassIDFromBatchDenom returns the credit class ID in a batch denom. | ||
func GetClassIDFromBatchDenom(denom string) string { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
breaking change
// GetProjectIdFromBatchDenom returns the credit project ID in a batch denom. | ||
func GetProjectIdFromBatchDenom(denom string) string { | ||
// GetProjectIDFromBatchDenom returns the credit project ID in a batch denom. | ||
func GetProjectIDFromBatchDenom(denom string) string { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
breaking change
// GetCreditTypeAbbrevFromClassId returns the credit type abbreviation in a credit class id | ||
func GetCreditTypeAbbrevFromClassId(classId string) string { | ||
// GetCreditTypeAbbrevFromClassID returns the credit type abbreviation in a credit class id | ||
func GetCreditTypeAbbrevFromClassID(classID string) string { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
breaking change
// SupplyInvariant cross check the balance of baskets and bank | ||
func SupplyInvariant(ctx sdk.Context, store api.BasketTable, bank bankSupplyStore, basketBalances map[uint64]math.Dec) (string, bool) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
breaking change
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Description
This pull request updates the lint configuration and fixes lint errors and warnings. This pull request also updates workflows to ensure each module is checked if changes are made within the given module and skips checks if no changes are made.
Author Checklist
All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.
I have...
!
to the type prefix if API or client breaking changeCHANGELOG.md
Reviewers Checklist
All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.
I have...
!
in the type prefix if API or client breaking change