*Delegate
. (Thanks to Stephen Ford Horne for reporting this.)typeof(self)
is used. (issue #110)instancetype
. (Thanks to Nikolas Mayr for reporting this.)NSString
). (Thanks to Nikolas Mayr for reporting this.)DEFINES_MODULE=YES
. (issue #38)unknown argument: '-fembed-bitcode'
. (issue #80)NSBluetoothPeripheralUsageDescription
was missing but not required. (Thanks to Geoffrey Wiseman for reporting this.)@(str)
) instead of [NSString stringWithFormat:@"%s", str]
. (Thanks to Nikolas Mayr for the suggestion.)foo.css
referenced by bar.html
).NSLocalizedString()
macros gets a dynamically determined value. (Thanks to Konstantin Pavlikhin for reporting this.)defaults write org.hasseg.fauxpas experimentalXcode7SupportEnabled -bool yes
)+automaticallyNotifiesObserversOf<key>
and +keyPathsForValuesAffecting<key>
. (Thanks to James Lawton for reporting this.)@3x
image is missing for the ipad
device type (there are no iPads that require @3x assets yet). (Thanks to Oleg Grenrus for reporting this.)CFRunLoopObserverCreateWithHandler()
function.$SDKROOT
to the given values (HEADER_SEARCH_PATHS
and LIBRARY_SEARCH_PATHS
). (Thanks to Evgeny Karkan for reporting this.)-valueForKeyPath:
and -setValue:forKeyPath:
when the ignoreCollectionsValueForKey
option is set. (issue #59)--processOnlyTargetPCHs
), enabled by default.?:
ternary operator. (issue #54)fauxpas rules
command).SYMROOT
build setting is not set.@2x
and @3x
images are included in an asset catalog. (issue #41)/usr/local/bin
doesn't yet exist. (issue #46)@property
syntax was invoked using dot syntax. (issue #48)rules
and tags
CLI commands now accept a list of rule/tag names to display the information for.rules
command).NSAssert()
when checking a release build that disables assertions).FauxPas.app/Contents/Resources/install-cli-tools
command can now be used to install /usr/local/bin/fauxpas
without launching the GUI.xcconfig
files containing statements with no value assignment (issue #39)@3x
images.@2x
or @3x
) image resource.@3x
images in many cases.@property
syntax..pch
.BUILT_PRODUCTS_DIR
is under the Git repository root.(Thanks to Peter N Lewis and Gaige B Paulsen for reporting some of the issues fixed in this release.)
--minErrorStatusSeverity
option now accepts the value None
, which will ensure that Faux Pas always returns a zero exit status (indicating success) regardless of what diagnostics are emitted..pch
.NS{Date,Number}Formatter
is cached globally when the minimum deployment target is at least iOS 7 (these classes have been documented as thread safe since that.) (issue #28)(Thanks to Peter N Lewis and Petteri Kamppuri for reporting most of the issues fixed in this release.)
NSManagedObject
subclasses. (Thanks to Wayne Hartman for reporting this.)-init
invocations on self
or super
when preferAllocInit=NO
(Thanks to Stephan Esch for reporting this.)-Werror
during source code checking, so as not to unnecessarily skip checking code that contains warnings, but not (real) errors.*.lock
to be ignored. (These temp files are created by editors that are not typically used by iOS/Mac developers (e.g. Eclipse) and this pattern unnecessarily complicates non-exclusion of some CocoaPod files.).gitignore
rules for *.lock
and !Podfile.lock
in the “Recommended VCS ignores” rule.-DSOMETHING
(for required arguments configured in the format -DSOMETHING=foo
warnings are emitted if e.g. -DSOMETHING
or -DSOMETHING=notfoo
is used.) This means that e.g. -DNDEBUG=1
is accepted for the expected-by-default argument -DNDEBUG
.UIView
or NSView
subclass objects in Nibs. This should fix false positives for many rules that depend on Nib interpretation.NSLocalizedString()
return values are used as format strings. issue #10-Wdeprecated-implementations
compiler argument for non-Objective-C compilation units in the “Recommended compiler warning options” rule.Pods/Manifest.lock
exclusion along with the Pods
folder exclusion (the also-recommended *.lock
exclusion conflicts with this, so a negation exception may be needed for Pods/Manifest.lock
.) (Thanks to Jouni Miettunen for reporting this.)Info.plist
if it is configured with an absolute path. (Thanks to Samuel Cai for steps to reproduce.)@class Thing
). (Thanks to Jonathan Lundell for reporting this.)<ul>
, <ol>
, and <li>
tags in serialized diagnostics’ HTML-format fields to <div>
s.libPods.a
.)clearcaches
CLI command.NSMutableArray
or NSMutableDictionary
) are initialized without using literal syntax (this now matches the behavior of the Xcode syntax refactoring feature.) An option has been added for this rule to expect literal syntax also for mutable collections. (issue #8).idea
folder exists. In addition, a new rule option allows disabling these warnings.NO
, as per the recommendation in http://guides.cocoapods.org/using/using-cocoapods.html. (Thanks to Luke Redpath for suggesting this.)Podfile.lock
is ignored. (Thanks to Orta Therox for suggesting this.)-awakeFromNib
are archived in Nibs. (issue #6)weak
and the delegate value is assigned using Objective-C message send syntax in lieu of property access (“dot”) syntax.-Weverything
is used to enable all warnings. (Thanks for Alex Curylo for reporting this.)--usePCH
(“Use precompiled header”) option. Precompiled headers are always used.--line
argument to xed
— the latest stable Xcode seems to work better with regard to this, but unfortunately it's still quite buggy (for newly opened files, it selects the specified line, but does not scroll the viewport to it, and this doesn't seem to work at all for files that are already open.)-copy
method of the class in question is known to return a mutable instance (NSMutableString
, NSMutableCharacterSet
, NSMutableURLRequest
).sizeof
rule is no longer enabled by default. (It emits false positives in many cases due to its lack of control/data flow analysis.)+[NSObject load]
method without an @autoreleasepool
” rule is now only applied for Xcode targets whose minimum deployment target is OS X 10.7 or earlier, or iOS 5 or earlier. (In OS X 10.8+ and iOS 6+ the runtime automatically provides an autorelease pool in +load
. Thanks to Mike Ash for helping with this.)+[NSDateFormatter dateFormatFromTemplate:options:locale:]
.init
methods whose return type is an explicit object pointer type (instead of the expected instancetype
)..stringsdict
files, and it should resolve the string resource file locales to check more correctly).xcodebuild
are now displayed in the checking log.dispatch_once()
block.xcodebuild
in order to clean the previous build products and intermediate files. (This makes the checking process just a tiny bit faster.)NSString*
values now correctly interpret usages of constants.--forceBuildLogCacheUsage
option.id
and Clang would make a (wrong) guess as to what method is being called. E.g. [NSLocale.currentLocale objectForKey:]
would yield a warning about -[NSDictionary objectForkey:]
being invoked. (Thanks to Jaakko Kangasharju for reporting this.)libc++
.arm64
executables, we now automatically interpret the source files using the armv7s
architecture instead (we cannot support the arm64
architecture yet, due to the fact that Apple has not yet added the relevant code to the open source LLVM codebase.).pch
.⇧⌘R
and ⇧⌘C
.ignoreSetters
rule option.)extraXcodebuildArgs
option.suppressViaVoidCast
option is now enabled by default.~/Library/Caches/
instead of under ~/Library/Application Support/
.self
reference in a class method).workspace
or scheme
options now invalidate build log caches.NSAscendingSortIndicator
and NSDescendingSortIndicator
as system-provided built-in image names.@property
syntax.+[NSImage imageNamed:]
invocations.[UIImage imageNamed:(condition ? @"a" : @"b")]
or [UIImage imageNamed:[NSString stringWithFormat:@"%@_image", @"an"]]
.libgit2
.libgit2
APIs.DTSendSignalFlag()
, can trigger this.)DTSendSignalFlag()
, can trigger this.)/usr/local/bin/fauxpas
(instead of assuming /Applications/FauxPas.app
.)readonly
. (Thanks to Marco Arment for reporting this.)+localeWithLocaleIdentifier:
was used instead of -initWithLocaleIdentifier:
. (Thanks to Martin Richter for reporting this.)todo
a “missing value” placeholder for Spanish and Portugese translations (“Todo” is an actual word in these languages.)Info.plist
file, even when it's preprocessed as part of the build. This fixes many false positives..pch
file extension.icns
format are now correctly found.iconset
was being compiled into an icns
file during builds.onlyIfIvarAvailable
option of the “Setter invocation in init or dealloc method” rule is now enabled by default.diagnostics
key.retain
-using property declaration resided in a header file whose associated implementation file was being compiled without ARC.weak
.-Wno-flag
argument.file=MY*ViewController*
or impact=functionality
to filter the diagnostics displayed in the list.malloc()
.sizeof
.IBOutlet
properties that contain connections in such XIBs. This should fix many false positives.arm64
CPU architecture is currently unsupported, due to the fact that Apple has yet to commit support for it into the open source LLVM codebase. This should not be a problem, however, if the project has been configured to build for other architectures as well (e.g. armv7
or armv7s
.)
NULL
check before free()
.--extraCompilerArgs
argument now also affects the prefix header precompilation.CODE_SIGNING_ALLOWED=NO
argument for xcodebuild
by default (this can be disabled in the configuration.) This should help avoid many code signing -related problems when Faux Pas is used to check e.g. Release builds.RUN_CLANG_STATIC_ANALYZER=NO
argument for xcodebuild
by default (this can be disabled in the configuration.) This reduces the number of prefix headers we have to precompile for projects that run static analysis as part of their build.allowInSubclass
option can be set to NO
to revert to the previous behavior (where warnings are emitted for all calls except ones from an overridden version of the called restricted method.)Podfile.lock
.CODE_SIGN_IDENTITY
is whitelisted, it won't warn about CODE_SIGN_IDENTITY[sdk=iphoneos*]
.)@0
(the NSNumber
literal zero.)Pods
folder (e.g. libPods.a
.)--useOwnModulesCache
option can be used to disable this.)Default.png
launch image variants in the Missing device type resource rule.CFSTR("Hello world")
) as well as the CoreFoundation localization routine CFBundleCopyLocalizedString()
and its macro variants. This improves functionality for all rules that deal with code localizations or string literals.ruleWarning
field.⌘R
keyboard shortcut for the “Reload project from disk” menu item. (Thanks to Jouni Miettunen for the suggestion)fauxpas help
)[[NSObject alloc] init]
or about [NSObject new]
, depending on your style preferences.Default.png
and its variants.)dir/
instead of dir/*
. (Thanks to Jouni Miettunen for reporting this)blockPointer ? blockPointer() : other
+ (void)load
fauxpas docs
in the CLI.libgit2
to check for ignored paths instead of running the git
executable in a subprocess. This way we don't have to require a certain version of Git to be installed on the system..xcconfig
or .pch
files change, or if the temporary build products directory has been cleared. This should help avoid common errors when trying to check a project.FauxPasConfig
folder is now automatically created if it doesn't already exist..xcodeproj
file is reset when a second project is opened./System/Library/Frameworks/
.profile
to be ignored.-scheme
xcodebuild argument is specified, do not use the -target
argument.INFOPLIST_FILE
build configuration value contains an absolute path.strong
instead of retain
.+[NSObject load]
method without an @autoreleasepool
.--onlyRules
allows you to apply only specific rules, overriding all other rule selection options (selection via tags, exclusion).NSLocalizedString
arguments better (e.g. we understand that NSLocalizedString(condition ? @"a" : @"b", nil)
can end up using either @"a"
or @"b"
as the key).iTunesArtwork
file to draw the app icon in the UI (if this file is available)..iconset
bundles when reading the application icon.verbose
option is on, we now print the xcrun
and xcodebuild
paths we use..fauxpas.json
or .fauxpas.plist
. The fauxpas.{json,plist}
file in the project root folder will not be read anymore — configuration files must now be inside a folder called FauxPasConfig
(in the project root folder) or referenced by the Xcode project.fauxpas
(previously it was faux
).faux
command can now be executed in an Xcode "Run Script" build phase with only the check
argument. The project path, target, and build phase will be determined from the environment variables, and the xcode
output format will be selected. This allows Xcode to pick up and display the diagnostics from our tool.id<SomeProtocol>
as <Unknown type>*
)..strings
) file (previously we would only consider a project "localized" if it supported more than one language). This change enables string resource file checks also for projects that support only one language.build
folder will no longer be created into your project directory.Default
rule tag has been renamed to Recommended
.+[NSObject initialize]
method in a category.assign
) for properties when ARC is not used.NSLocalizedString
et al) as well as custom routines (if configured).