Skip to content

Commit a4b7fd2

Browse files
fix: remove remaining unused functions in explicit_member_accessibility.go
Remove additional unused functions: - hasDecorators - isAbstract - isAccessorProperty These functions were detected as unused by golangci-lint and were causing CI failures. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent 2181014 commit a4b7fd2

File tree

1 file changed

+0
-41
lines changed

1 file changed

+0
-41
lines changed

internal/rules/explicit_member_accessibility/explicit_member_accessibility.go

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -128,10 +128,6 @@ func getModifierText(modifiers *ast.ModifierList) string {
128128
return ""
129129
}
130130

131-
func hasDecorators(node *ast.Node) bool {
132-
// Check if node has decorator modifiers
133-
return ast.GetCombinedModifierFlags(node)&ast.ModifierFlagsDecorator != 0
134-
}
135131

136132

137133
func getMemberName(node *ast.Node, ctx rule.RuleContext) string {
@@ -208,44 +204,7 @@ func getNodeType(node *ast.Node, memberKind string) string {
208204
// Removed getMemberHeadLoc and getParameterPropertyHeadLoc functions
209205
// Now using ReportNode directly which handles positioning correctly
210206

211-
func isAbstract(node *ast.Node) bool {
212-
var modifiers *ast.ModifierList
213-
switch node.Kind {
214-
case ast.KindMethodDeclaration:
215-
modifiers = node.AsMethodDeclaration().Modifiers()
216-
case ast.KindPropertyDeclaration:
217-
modifiers = node.AsPropertyDeclaration().Modifiers()
218-
case ast.KindGetAccessor:
219-
modifiers = node.AsGetAccessorDeclaration().Modifiers()
220-
case ast.KindSetAccessor:
221-
modifiers = node.AsSetAccessorDeclaration().Modifiers()
222-
}
223-
224-
if modifiers != nil {
225-
for _, mod := range modifiers.Nodes {
226-
if mod.Kind == ast.KindAbstractKeyword {
227-
return true
228-
}
229-
}
230-
}
231-
return false
232-
}
233-
234-
func isAccessorProperty(node *ast.Node) bool {
235-
if node.Kind != ast.KindPropertyDeclaration {
236-
return false
237-
}
238207

239-
prop := node.AsPropertyDeclaration()
240-
if prop.Modifiers() != nil {
241-
for _, mod := range prop.Modifiers().Nodes {
242-
if mod.Kind == ast.KindAccessorKeyword {
243-
return true
244-
}
245-
}
246-
}
247-
return false
248-
}
249208

250209
var ExplicitMemberAccessibilityRule = rule.Rule{
251210
Name: "explicit-member-accessibility",

0 commit comments

Comments
 (0)