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

Initial purity plugin #99

Merged
merged 1 commit into from
Nov 10, 2019
Merged

Initial purity plugin #99

merged 1 commit into from
Nov 10, 2019

Conversation

i-walker
Copy link
Member

@i-walker i-walker commented Nov 9, 2019

Screenshot 2019-11-09 at 21 56 30

Screenshot 2019-11-09 at 21 56 56

This aims to solve #28
The InspectionSyntax allows us to write costume Inspections based on Tooling, what Kotlin already uses in the editor. This allows plugin developers to not only indicate code elements, which need to be inspected but additionally to manipulate them programmatically.
As here to add a suspended keyword to a function.

ApplicableInspections can traverse any KtElement. Furthermore, we can extend the Scope of Inspection to the whole Project instead of individual files. This allows users to write fast fixes, which are universal for the whole project and deal with subsequent issues.

I'll add checks for calls in the function body, which return Unit or Nothing.
We should also add Text for an explanation.

@i-walker i-walker requested a review from raulraja November 9, 2019 21:20
LocalInspectionTool::class.java
)*/
val ArrowPath: Array<String>
get() = arrayOf("Kotlin", "Λrrow")
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
get() = arrayOf("Kotlin", "Λrrow")
arrayOf("Kotlin", "Λrrow")

)
)
}
get() = TODO()
Copy link
Member

Choose a reason for hiding this comment

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

We should probably remove the whole file

Copy link
Member

@raulraja raulraja left a comment

Choose a reason for hiding this comment

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

Great stuff!

@raulraja raulraja merged commit 5db3ed3 into master Nov 10, 2019
@raulraja raulraja deleted the is-purity branch November 10, 2019 12:24
@i-walker i-walker restored the is-purity branch November 10, 2019 15:55
bloderxd pushed a commit to bloderxd/arrow-meta that referenced this pull request Nov 11, 2019
@i-walker i-walker deleted the is-purity branch November 14, 2019 12:37
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