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

Add missing nullable and nonnull attributes #2802

Merged
merged 5 commits into from
Aug 2, 2019
Merged

Add missing nullable and nonnull attributes #2802

merged 5 commits into from
Aug 2, 2019

Conversation

RomanPodymov
Copy link
Contributor

New Pull Request Checklist

  • I have read and understood the CONTRIBUTING guide

  • I have read the Documentation

  • I have searched for a similar pull request in the project and found none

  • I have updated this branch with the latest master to avoid conflicts (via merge from master or rebase)

  • I have added the required tests to prove the fix/feature I am adding

  • I have updated the documentation (if necessary)

  • I have run the tests and they pass

  • I have run the lint and it passes (pod lib lint)

Pull Request Description

Hello.
Thank you for your library.
I found out that in some *.m-files nullable and nonnull attributes are missing. I know that this is not an issue because these attributes are using in the corresponding headers files. I just want to keep the same code style for all files.

@dreampiggy
Copy link
Contributor

I know that this is not an issue because these attributes are using in the corresponding headers files

Yes. This is why we only mark all the public header's null ability, you can also find something in private header does not care about this.

Because, in Objective-C, the null ability is just a annotation without any compiler guide. So in the implementation files we does not care about this. It's only used for Swift Generated API and check.

Mark every implementation file will cause some dummy code change, I don't think it's a really important thing. But there are one thing we should add to our conttribution guideline.

  • If one API is marked as **Public ** (must visible from outside and not in Private folder), the both interface and implementation should keep the nullability

This may be a better solution

@dreampiggy dreampiggy added this to the 5.1.0 milestone Aug 2, 2019
@dreampiggy dreampiggy self-requested a review August 2, 2019 10:34
@dreampiggy dreampiggy merged commit 54b6d9d into SDWebImage:master Aug 2, 2019
@bpoplauschi
Copy link
Member

@RomanPodymov Thanks a lot for showing interest and contributing to SDWebImage! I know it's been a while since you contributed, but we would like to invite you to become a maintainer – no pressure to accept! You can pitch in with what seems comfortable: comment on open issues/PRs, triage, improve documentation, write your own PRs. Let me know if you are interested.

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

Successfully merging this pull request may close these issues.

3 participants