Skip to content

Commit a2afd38

Browse files
author
Gusted
authored
Enable linter [rule.modifies-value-receiver] and refactor RoleDescriptor (#18093)
1 parent 4da2eab commit a2afd38

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

.revive.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,4 @@ warningCode = 1
2424
[rule.indent-error-flow]
2525
[rule.errorf]
2626
[rule.duplicated-imports]
27+
[rule.modifies-value-receiver]

models/issue_comment.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,7 @@ const (
123123

124124
// WithRole enable a specific tag on the RoleDescriptor.
125125
func (rd RoleDescriptor) WithRole(role RoleDescriptor) RoleDescriptor {
126-
rd |= (1 << role)
127-
return rd
126+
return rd | (1 << role)
128127
}
129128

130129
func stringToRoleDescriptor(role string) RoleDescriptor {

0 commit comments

Comments
 (0)