mirror of
https://github.com/mgechev/revive.git
synced 2025-07-05 00:28:53 +02:00
fix some typos in repository (#728)
This commit is contained in:
@ -5,8 +5,8 @@
|
|||||||
<!-- ### CHECKLIST ### -->
|
<!-- ### CHECKLIST ### -->
|
||||||
<!-- Please, describe in details what's your motivation for this PR -->
|
<!-- Please, describe in details what's your motivation for this PR -->
|
||||||
<!-- Did you add tests? -->
|
<!-- Did you add tests? -->
|
||||||
<!-- Does your code follows the coding style of the rest of the repository? -->
|
<!-- Does your code follow the coding style of the rest of the repository? -->
|
||||||
<!-- Does the Travis build passes? -->
|
<!-- Does the Travis build passes? -->
|
||||||
|
|
||||||
<!-- ### FOOTER (OPTIONAL) ### -->
|
<!-- ### FOOTER (OPTIONAL) ### -->
|
||||||
<!-- If you're closing an issue add "Closes #XXXX" in your comment. This way, the PR will be linked to the issue automatically. -->
|
<!-- If you're closing an issue, add "Closes #XXXX" in your comment. This way, the PR will be linked to the issue automatically. -->
|
||||||
|
@ -471,7 +471,7 @@ List of all available rules. The rules ported from `golint` are left unchanged a
|
|||||||
| [`import-shadowing`](./RULES_DESCRIPTIONS.md#import-shadowing) | n/a | Spots identifiers that shadow an import | no | no |
|
| [`import-shadowing`](./RULES_DESCRIPTIONS.md#import-shadowing) | n/a | Spots identifiers that shadow an import | no | no |
|
||||||
| [`bare-return`](./RULES_DESCRIPTIONS.md#bare-return) | n/a | Warns on bare returns | no | no |
|
| [`bare-return`](./RULES_DESCRIPTIONS.md#bare-return) | n/a | Warns on bare returns | no | no |
|
||||||
| [`unused-receiver`](./RULES_DESCRIPTIONS.md#unused-receiver) | n/a | Suggests to rename or remove unused method receivers | no | no |
|
| [`unused-receiver`](./RULES_DESCRIPTIONS.md#unused-receiver) | n/a | Suggests to rename or remove unused method receivers | no | no |
|
||||||
| [`unhandled-error`](./RULES_DESCRIPTIONS.md#unhandled-error) | []string | Warns on unhandled errors returned by funcion calls | no | yes |
|
| [`unhandled-error`](./RULES_DESCRIPTIONS.md#unhandled-error) | []string | Warns on unhandled errors returned by function calls | no | yes |
|
||||||
| [`cognitive-complexity`](./RULES_DESCRIPTIONS.md#cognitive-complexity) | int | Sets restriction for maximum Cognitive complexity. | no | no |
|
| [`cognitive-complexity`](./RULES_DESCRIPTIONS.md#cognitive-complexity) | int | Sets restriction for maximum Cognitive complexity. | no | no |
|
||||||
| [`string-of-int`](./RULES_DESCRIPTIONS.md#string-of-int) | n/a | Warns on suspicious casts from int to string | no | yes |
|
| [`string-of-int`](./RULES_DESCRIPTIONS.md#string-of-int) | n/a | Warns on suspicious casts from int to string | no | yes |
|
||||||
| [`string-format`](./RULES_DESCRIPTIONS.md#string-format) | map | Warns on specific string literals that fail one or more user-configured regular expressions | no | no |
|
| [`string-format`](./RULES_DESCRIPTIONS.md#string-format) | map | Warns on specific string literals that fail one or more user-configured regular expressions | no | no |
|
||||||
|
@ -28,12 +28,12 @@ func (*UnconditionalRecursionRule) Name() string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type funcDesc struct {
|
type funcDesc struct {
|
||||||
reciverID *ast.Ident
|
receiverID *ast.Ident
|
||||||
id *ast.Ident
|
id *ast.Ident
|
||||||
}
|
}
|
||||||
|
|
||||||
func (fd *funcDesc) equal(other *funcDesc) bool {
|
func (fd *funcDesc) equal(other *funcDesc) bool {
|
||||||
receiversAreEqual := (fd.reciverID == nil && other.reciverID == nil) || fd.reciverID != nil && other.reciverID != nil && fd.reciverID.Name == other.reciverID.Name
|
receiversAreEqual := (fd.receiverID == nil && other.receiverID == nil) || fd.receiverID != nil && other.receiverID != nil && fd.receiverID.Name == other.receiverID.Name
|
||||||
idsAreEqual := (fd.id == nil && other.id == nil) || fd.id.Name == other.id.Name
|
idsAreEqual := (fd.id == nil && other.id == nil) || fd.id.Name == other.id.Name
|
||||||
|
|
||||||
return receiversAreEqual && idsAreEqual
|
return receiversAreEqual && idsAreEqual
|
||||||
|
Reference in New Issue
Block a user