realm/SwiftLint

`generic_type_name` triggers incorrectly for integer generic parameters

已关闭

#6,213 创建于 2025年8月30日

 (3 条评论) (0 个反应) (0 位负责人)Swift (2,295 个派生)batch import
enhancementgood first issue

仓库指标

星标
 (19,570 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

Bug Description

SE-0452 introduced integer generic parameters, which are placed alongside other generic parameters, but, in contrast to "normal" (type) generic parameters, are spelled like variables, ie starting with a lowercase identifier. SwiftLint current;y doesn

// This triggers a violation:
struct Foo<let count: Int> {}

Mention the command or other SwiftLint integration method that caused the issue. Include stack traces or command output.

$ swiftlint

Environment

  • SwiftLint version: 0.59.1 (Homebrew)
  • Xcode version: Xcode 26.0 (17A5305f)
  • Configuration file: default configurations

贡献者指南