Skip to content

Regression: line_length does not trigger error when ignores_function_declarations is enabled #6347

Closed

Description

@lukjj-public-pega

New Issue Checklist

Bug Description

Configuration:

line_length:
  warning: 100
  error: 100 
  ignores_function_declarations: true

Source file:

func test() {
    try FileManager.default.url(for: .cachesDirectory, in: .userDomainMask, appropriateFor: nil, create: true)
}

Xcode version:

% xcodebuild -version
Xcode 26.1.1
Build version 17B100

I tested portable versions from GitHub. When using 0.62.2:

./swiftlint --config ./.swiftlint.yaml
Linting Swift files in current working directory
Linting 'test.swift' (1/1)
Done linting! Found 0 violations, 0 serious in 1 file.

Latest working version was 0.59.1:

./swiftlint --config ./.swiftlint.yaml
<path removed>/test.swift:2:1: error: Line Length Violation: Line should be 100 characters or less; currently it has 110 characters (line_length)
Done linting! Found 1 violation, 1 serious in 1 file.

Setting ignores_function_declarations to false resolves the issue on 0.62.2.

Activity

  1. added
    bug
    on Nov 18, 2025
  2. added a commit that references this issue on Jan 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions