Skip to content

Conflicts on non_overridable_class_declaration and redundant_final #6936

Open

Description

@417-72KI

New Issue Checklist

Bug Description

public final class HogeView: UIView {
    override public class var layerClass: AnyClass { // warning: Class Declaration in Final Class Violation: Class properties in final classes should themselves be final (non_overridable_class_declaration)
        AVCaptureVideoPreviewLayer.self
    }
}

public final class HogeView: UIView {
    override public final class var layerClass: AnyClass { // warning: Redundant Final Violation: `final` is redundant (redundant_final)
        AVCaptureVideoPreviewLayer.self
    }
}

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

$ swiftlint lint [--no-cache] [--fix]

Environment

  • SwiftLint version
    • 0.65.1
  • Xcode version
    • Xcode 26.6
    • Build version 17F113
  • Installation method used
    • Mint
  • Configuration file:
allow_zero_lintable_files: true
opt_in_rules: [all]
analyzer_rules: [all]
disabled_rules:
  - accessibility_label_for_image
  - anonymous_argument_in_multiline_closure
  - async_without_await
  - conditional_returns_on_newline
  - contrasted_opening_brace
  - discouraged_default_parameter
  - explicit_acl
  - explicit_enum_raw_value
  - explicit_self
  - explicit_top_level_acl
  - explicit_type_interface
  - extension_access_modifier
  - fatal_error_message
  - file_header
  - file_name
  - file_types_order
  - force_cast
  - force_try
  - force_unwrapping
  - function_default_parameter_at_end
  - ibinspectable_in_extension
  - implicitly_unwrapped_optional
  - incompatible_concurrency_annotation
  - inclusive_language
  - indentation_width
  - missing_docs
  - nimble_operator
  - no_empty_block
  - no_extension_access_modifier
  - no_grouping_extension
  - no_magic_numbers
  - object_literal
  - one_declaration_per_file
  - prefer_nimble
  - prefixed_toplevel_constant
  - prohibited_interface_builder
  - required_deinit
  - return_value_from_void_function
  - shorthand_argument
  - sorted_enum_cases
  - static_over_final_class
  - strict_fileprivate
  - strong_iboutlet
  - switch_case_on_newline
  - unavailable_function
  - unneeded_escaping
  - unneeded_throws_rethrows
  - unowned_variable_capture
  - unused_optional_binding
  - unused_parameter
  - variable_shadowing
  - vertical_whitespace_between_cases
  - void_function_in_ternary
  - prefer_self_in_static_references
  - line_length
  - sorted_imports
  - type_contents_order
  - closure_body_length
  - discouraged_optional_boolean
  - discouraged_optional_collection
  - enum_case_associated_values_count
  - file_length
  - function_body_length
  - legacy_objc_type
  - todo

Are you using nested configurations? If so, paste their
relative paths and respective contents.

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions