Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable warnings for Swift #3

Open
SimplGy opened this issue May 16, 2015 · 1 comment
Open

Enable warnings for Swift #3

SimplGy opened this issue May 16, 2015 · 1 comment

Comments

@SimplGy
Copy link

SimplGy commented May 16, 2015

I've followed the direction in the README to attach warnings.xconfig to the project:
image

Then I've done some things to specifically test that some of these errors are thrown:

// empty loop
for _ in 0..<3 { } 

// shadowed variable
var index = 0
func another(){
  var index = 3 
}

I can build and run with no problem, however, and the errors aren't shown either as warnings or build blockers. Do I have this configured wrong? I'm probably doing something basic and silly, I'm very new to iOS, just want to start with guard rails.

@boredzo
Copy link
Owner

boredzo commented May 16, 2015

These warnings currently only apply to C-based languages, such as Objective-C. AFAIK, there's no way to make them apply to Swift—though I'll leave this open in case I'm wrong, or in case they add them at some point. (And I'll change the title to make clear what I'm using this bug for.)

In the meantime, please file bug reports at https://bugreport.apple.com/ asking for these warnings to be added to Swift.

@boredzo boredzo changed the title Getting xcode to fail hard Enable warnings for Swift May 16, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants