Skip to content

Add missing nullable and nonnull attributes#2802

Merged
dreampiggy merged 5 commits into
SDWebImage:masterfrom
RomanPodymov:master
Aug 2, 2019
Merged

Add missing nullable and nonnull attributes#2802
dreampiggy merged 5 commits into
SDWebImage:masterfrom
RomanPodymov:master

Conversation

@RomanPodymov

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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