Skip to content

Parameterize SKIP NOWARN comment to add specificity to the warning it is squelching #198

@marcprux

Description

@marcprux

In skiptools/skip-ui#341 we need to add a "SKIP NOWARN" comment to a View extension in order to avoid the warning

This extension will be moved into its extended type definition when translated to Kotlin. It will not be able to access this file's private types or fileprivate members

// SKIP NOWARN
extension View {
    public func alert(_ titleKey: LocalizedStringKey, isPresented: Binding<Bool>, @ViewBuilder actions: () -> any View) -> any View {
        return alert(Text(titleKey), isPresented: isPresented, actions: actions)
    }

However, there is a lot of code in this extension, and it would nice to be able to continue to have warnings in the event there is some other issue within the body of the View extension.

It would be nice if we could parameterize the NOWARN to squelch only the issue about extensions being unable to access private/fileprivate stuff, perhaps identified by some tag(s). Something like:

// SKIP NOWARN(EXTENSION_MERGING)
extension View { … }

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions