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

Detekt rule for detecting suspend functions and flows declarations, exposed to Obj-C #140

Open
Pschsch opened this issue Sep 16, 2023 · 4 comments

Comments

@Pschsch
Copy link

Pschsch commented Sep 16, 2023

Would be useful for teams who use this so popular analyzer

@rickclephas
Copy link
Owner

As of version 1.0.0-ALPHA-16, such checks are built into the compiler plugin. Together with the IDE plugin those warnings (or errors) are also shown in the IDE.

What would be the added benefit of a Detekt rule?

@vanniktech
Copy link

I've also seen this warning but I've ignored it. What's the proper way to fix this?

@rickclephas
Copy link
Owner

@vanniktech you can either ignore specific declarations explicitly, or you can disable the check altogether.

@Pschsch
Copy link
Author

Pschsch commented Sep 20, 2023

We want to throw an error if suspend and flow exposed to obj-c without plugin to clean up domain layer, because we want apply plugin only on ViewModel layer. With detekt we could achieve this automatically to avoid manual validating. As the alternative, kmp-native-coroutines plugin could provide plugin extension with flow declarations exposing compiler error level: warning or error. What do you think about this way?

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

3 participants