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 a new rule: HidesBottomBar #176

Merged
merged 16 commits into from
Feb 6, 2022

Conversation

ykkd
Copy link
Contributor

@ykkd ykkd commented Feb 6, 2022

About

  • Add a new rule to check if HidesBottomBarWhenPushed is enabled

  • HidesBottomBar rule is especially useful when the most of ViewControllers in your app need to be pushed with their bottom bar hidden.

    • Since the value of HidesBottomBarWhenPushed is false by default, I assume this rule can help prevent possible human errors.
  • In order to implement the rule, I had to make change to IBDecodable, too.

    • I will fix Packages.swift and open this PR, once the one for IBDecodable's approved

P.S.

Thanks for this wonderful tool!

@kateinoigakukun
Copy link
Collaborator

kateinoigakukun commented Feb 6, 2022

OK, I've just released IBDecodable 0.5.0 including your change.

@ykkd ykkd marked this pull request as ready for review February 6, 2022 15:11
@ykkd
Copy link
Contributor Author

ykkd commented Feb 6, 2022

@kateinoigakukun thanks again!

}

private func validate<T: InterfaceBuilderFile>(for viewController: ViewControllerProtocol, file: T) -> Violation? {
guard let customClass = viewController.customClass,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems this rule is only applied for view controllers with custom classes, is this intentional? Should we warn a VC, which doesn't specify hidesBottomBarWhenPushed and doesn't have a custom class?

@ykkd
Copy link
Contributor Author

ykkd commented Feb 6, 2022

@kateinoigakukun
Thanks!
It was intentional but now that you ask me, I agree with you.
I suppose previous commits fixed the issue.

Copy link
Collaborator

@kateinoigakukun kateinoigakukun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice 😎

@kateinoigakukun kateinoigakukun merged commit 2f0a205 into IBDecodable:master Feb 6, 2022
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

Successfully merging this pull request may close these issues.

2 participants