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

AT Overhaul #2365

Open
wants to merge 20 commits into
base: dev
Choose a base branch
from
Open

AT Overhaul #2365

wants to merge 20 commits into from

Conversation

RedNesto
Copy link
Member

@RedNesto RedNesto commented Aug 29, 2024

Fixes #2371, fixes #219, fixes #183

This should resolved all the highlighting weirdnesses happening while
 editing ATs, like whole entries being red while correct

 Also adds a recovery rule for keywords and only use consumeTokenFast
  for recovery rules, to show users what is wrong with their syntax
AtGotoDeclarationHandler is replaced by proper PsiReferences
They no longer use SRG for member names
Removed redundant code and fixes some false positives
Also fixes AtParserDefinition#spaceExistenceTypeBetweenTokens
Also fixes initial entry indent being 8 spaces instead of none
}

private fun isSuppressing(entryComment: String, toolId: String): Boolean {
val suppressed = entryComment.substringAfter("Suppress:").substringBefore(' ').split(',')
Copy link
Member

Choose a reason for hiding this comment

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

To follow the IntelliJ standard shouldn't this look for noinspecetion?

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't think there's a standard, the Properties plugin uses suppress as a keyword too.

override fun getText(): @IntentionName String = when (startElement) {
is AtEntry -> "Suppress $toolId for entry"
is AtFile -> "Suppress $toolId for file"
else -> "Suppress $toolId"
Copy link
Member

Choose a reason for hiding this comment

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

Is there an option to suppress an individual entry inspection for the whole file? Or am I just not reading this right?

Copy link
Member Author

Choose a reason for hiding this comment

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

The fix supports both file-level and entry-level suppressions.

src/main/kotlin/platform/mcp/at/at-utils.kt Outdated Show resolved Hide resolved
src/test/kotlin/framework/test-util.kt Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants