Skip to content

False positives for settings already covered by Xcode defaultsΒ #19

Description

@red-beeard

Hello Antoine!
First of all β€” great skill, really appreciate the work that went into this! πŸ™Œ I've been enjoying using it on our project.

I noticed a few recommendations that appear to be false positives because the flagged settings are already covered by Xcode's built-in platform defaults.

Affected recommendations:

  • Set ONLY_ACTIVE_ARCH to NO for Release β€” Evidence: (unset). Already resolved to NO by default for Release.
  • Set ENABLE_TESTABILITY to NO for Release β€” Evidence: (unset). Already resolved to NO by default for Release.
  • Set GCC_OPTIMIZATION_LEVEL to s for Release β€” Evidence: (unset). This setting doesn't appear in xcodebuild -showBuildSettings output at all, so I can't confirm its resolved value β€” but the Xcode Build Settings editor shows it in gray (inherited), suggesting it's also covered by platform defaults.

Running xcodebuild -showBuildSettings confirms the first two are already resolved to the recommended values, even though they're not explicitly set at the project/target level:

ONLY_ACTIVE_ARCH = NO
ENABLE_TESTABILITY = NO
Image Image

(GCC_OPTIMIZATION_LEVEL doesn't appear at all in the output, which itself indicates Xcode is using its built-in default of s.)

The attached screenshots from Xcode's Build Settings editor show all three values displayed in gray (inherited), confirming they're already in effect.

Image Image Image

The analyzer seems to check for an explicit value rather than the resolved value. Using xcodebuild -showBuildSettings to read the effective value before flagging a recommendation could eliminate this class of false positives entirely.

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions