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

Property setter detection - detect upper case #89

Closed
charlieMonroe opened this issue Oct 13, 2015 · 2 comments
Closed

Property setter detection - detect upper case #89

charlieMonroe opened this issue Oct 13, 2015 · 2 comments
Labels

Comments

@charlieMonroe
Copy link

Example:

NSMutableURLRequest *request = ...;
[request setHTTPMethod:@"POST"];

Result:

let request = ...
request.hTTPMethod = "POST"

Should be:

let request = ...
request.HTTPMethod = "POST"

Before lowercasing the first letter, see if the next one is uppercase as well, in which case, you shouldn't be lowercasing the first letter.

@drkameleon
Copy link
Collaborator

Ooops. Great catch - hadn't even noticed this one...

@drkameleon drkameleon added the bug label Oct 13, 2015
@drkameleon
Copy link
Collaborator

Fixed as of the upcoming 2.0.


Example:

@implementation aClass

- (void)main {
    [request setHTTPMethod:@"POST"];
    [request setAnotherVariable:@"someVal"];
}

@end

Output:

class aClass {

    func main() {
        request.HTTPMethod = "POST"
        request.anotherVariable = "someVal"

    }

}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants