Skip to content

Fixing typos - #617

Merged
VISTALL merged 1 commit into
consulo:masterfrom
unv-unv:typos
Oct 15, 2026
Merged

VISTALL merged 1 commit into
consulo:masterfrom
unv-unv:typos

Conversation

@unv-unv

@unv-unv unv-unv commented Oct 15, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@unv-unv

unv-unv commented Oct 15, 2026

Copy link
Copy Markdown
Contributor Author

@claude review pr with inline comments

@github-actions

github-actions Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @unv-unv's task in 2m 33s —— View job


Review of PR #617: Fixing typos

  • Gather context (diff vs origin/master)
  • Check renames and public API changes for missed references
  • Check the typo fixes themselves
  • Post inline comments with suggestions: 13 inline comments
  • Final summary

Most of the PR is good: the renames are applied consistently across the Java sources, and the @since / @author cleanup and @SuppressWarnings("SpellCheckingInspection") additions are fine. I didn't run the Maven build or the tests. I found the problems below by searching the code.

🔴 Blocking

  1. The build will break. The CSharpPreprocesorTokens → CSharpPreprocessorTokens rename missed the two .flex lexer sources, lexer/_CSharpMacroLexer.flex and lexer/CSharpPreprocessorHighlightLexer.flex. Their Java code is generated at build time (generate-lexers goal), so csharp-psi-impl won't compile.
  2. A test will fail. tests/src/test/resources/parsing/Issue267.txt (lines 95 and 103) still expects CSharpAnonymFieldOrPropertySetImpl in the PSI dump.

Neither file is in the diff, so I couldn't attach a one-click suggestion. Both need a find/replace.

🟠 Should fix

  1. getGlobalUsings → getGlobalUsages changes the meaning. "Usings" refers to C# global using directives; it wasn't a typo. It is also public API in csharp-psi-api. The inline suggestions revert it in CSharpFile, CSharpFileImpl and CSharpResolveUtil.

🟡 Consider

  1. Public API renames can break other plugins. This covers CSharpElementVisitor.visitAnonymMethodExpression, OverrideUtil.collectOverridenMembers, CSharpAnonymFieldOrPropertySet and others. An override of the visitor method without @Override would still compile but silently stop being called. If other plugins use these, a deprecated bridge method would avoid that.
  2. Wording and leftovers:
    • Grammar nits with suggestions inline: CS0107, CS0214, MethodParsing, PrefixOperatorEvaluator, CSharpExpressionCompletionContributor.
    • In CSharpSearchUtil, "until we don't make" says the opposite of what's meant.
    • "Searching for " + "overridden" is a leftover string concatenation.
    • Typos still left: rparenthOffset (only the lParenthOffset side was renamed), Hided… and CSharpPreprocessorHightlightLexer.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Review of the typo-fix PR. Most changes look good: the renames are applied consistently across the Java sources, and the @since normalisation and @SuppressWarnings("SpellCheckingInspection") additions are fine.

Blocking

  1. _CSharpMacroLexer.flex and CSharpPreprocessorHighlightLexer.flex still reference CSharpPreprocesorTokens. These lexers are generated at build time, so csharp-psi-impl won't compile.
  2. tests/src/test/resources/parsing/Issue267.txt still expects CSharpAnonymFieldOrPropertySetImpl, so the parsing test will fail.

Should fix
3. getGlobalUsings → getGlobalUsages is a semantic regression: these are C# global using directives, not usages.

Consider
4. Several public API renames (the visitor method, OverrideUtil, a psi-api interface) can break downstream plugins.
5. A few comment and grammar nits have suggestions inline. There's also a minor inconsistency in CSharpParenthesesInsertHandler: lParenthOffset was renamed but rparenthOffset wasn't.

* @since 2014-01-23
*/
public interface CSharpPreprocesorTokens extends StandardTokenTypes {
public interface CSharpPreprocessorTokens extends StandardTokenTypes {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔴 Build break: the lexers are generated at build time from .flex sources (generate-lexers goal in csharp-psi-impl/pom.xml), and both still reference the old name:

  • lexer/_CSharpMacroLexer.flex: import ...CSharpPreprocesorTokens; + 29 usages
  • lexer/CSharpPreprocessorHighlightLexer.flex: import ...CSharpPreprocesorTokens; + 21 usages

Those files aren't in the diff, so no suggestion block is possible here. Replace CSharpPreprocesorTokens → CSharpPreprocessorTokens in both .flex files. (While there: %class CSharpPreprocessorHightlightLexer is also a typo, but renaming it touches CSharpPreprocessorSyntaxHighlighter and CSharpHighlightLexer2 too.)

* @since 2015-04-07
*/
public class CSharpAnonymFieldOrPropertySetImpl extends CSharpElementImpl implements CSharpAnonymFieldOrPropertySet
public class CSharpAnonymousFieldOrPropertySetImpl extends CSharpElementImpl implements CSharpAnonymousFieldOrPropertySet

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔴 Test failure: PSI tree dumps include the impl class name, and tests/src/test/resources/parsing/Issue267.txt (lines 95 and 103) still expects

CSharpAnonymFieldOrPropertySetImpl(ANONYM_FIELD_OR_PROPERTY_SET)

so the Issue267 parsing test will fail. Update it to CSharpAnonymousFieldOrPropertySetImpl(ANONYM_FIELD_OR_PROPERTY_SET).

(Keeping the ANONYM_FIELD_OR_PROPERTY_SET element-type debug name avoids more test churn, which is fine.)


@RequiredReadAction
default Collection<String> getGlobalUsings()
default Collection<String> getGlobalUsages()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟠 This changes the meaning. Usings was not a typo: it refers to C# global using directives (global using System.Linq;), and the method returns their namespace qNames. Usages means "places where something is used", which is misleading. The private helper CSharpFileImpl.getGlobalUsingsImpl() also still has the old name. And this is a public API method on CSharpFile (psi-api), so the rename can break other plugins. I'd suggest reverting it, along with CSharpFileImpl:127 and CSharpResolveUtil:208:

Suggested change
default Collection<String> getGlobalUsages()
default Collection<String> getGlobalUsings()

Alternatively, use something unambiguous like getGlobalUsingNamespaces().

@RequiredReadAction
@Override
public Collection<String> getGlobalUsings()
public Collection<String> getGlobalUsages()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Revert this together with CSharpFile#getGlobalUsings (see the comment there):

Suggested change
public Collection<String> getGlobalUsages()
public Collection<String> getGlobalUsings()

if(containingFile instanceof CSharpFile file)
{
for(String qName : file.getGlobalUsings())
for(String qName : file.getGlobalUsages())

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
for(String qName : file.getGlobalUsages())
for(String qName : file.getGlobalUsings())

if(type != null)
{
// disable native type completion, due they dont extends System.Exception
// disable native type completion, due to they don't extend System.Exception

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Grammar nit ("due to" needs a noun):

Suggested change
// disable native type completion, due to they don't extend System.Exception
// disable native type completion, because they don't extend System.Exception

}
}
// dont return array if size of elements if not equal tokens
// Don't return array if size of elements if not equal to tokens

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
// Don't return array if size of elements if not equal to tokens
// Don't return array if size of elements is not equal to tokens

if(!(qualifiedElement instanceof DotNetModifierListOwner))
{
// dont interest if we dont have parent - how it can be?
// Doesn't interest if we don't have parent - how can it be?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
// Doesn't interest if we don't have parent - how can it be?
// Not interested if there is no parent - how can that happen?

Comment on lines +266 to +267
// If no modifiers but we failed to parse type - need go advance, due to ill infinity loop inside parseParameterList,
// but don't eat closing brace

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
// If no modifiers but we failed to parse type - need go advance, due to ill infinity loop inside parseParameterList,
// but don't eat closing brace
// If there are no modifiers but we failed to parse type - we need to advance, otherwise there will be an infinite loop inside parseParameterList,
// but don't eat closing brace

final int parameterSize)
{
//TODO [VISTALL] some hack until we dont make override more powerfull
//TODO [VISTALL] some hack until we don't make override more powerful

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The double negative flips the meaning:

Suggested change
//TODO [VISTALL] some hack until we don't make override more powerful
//TODO [VISTALL] some hack until we make override more powerful

@unv-unv

unv-unv commented Oct 15, 2026

Copy link
Copy Markdown
Contributor Author

@claude review pr with inline comments

@github-actions

github-actions Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @unv-unv's task in 1m 50s —— View job


Re-review of PR #617: Fixing typos

  • Gather context (diff vs origin/master)
  • Re-check issues raised in the earlier review
  • Look for new problems
  • Post inline comments with suggestions: 3 new inline comments (1, 2, 3)
  • Final summary

I didn't run the Maven build or the tests. I checked the fixes by searching the code with git grep.

✅ Fixed since the last review

  • The build break is fixed. Both _CSharpMacroLexer.flex and CSharpPreprocessorHighlightLexer.flex now use CSharpPreprocessorTokens.
  • The test fix is in. Issue267.txt now expects CSharpAnonymousFieldOrPropertySetImpl(ANONYMOUS_FIELD_OR_PROPERTY_SET). That matches the renamed class and the renamed element-type debug name in CSharpElements.
  • getGlobalUsings is restored in CSharpFile, CSharpFileImpl and CSharpResolveUtil.
  • No references to the old names are left. I searched the repo for each one and found nothing: CSharpPreprocesorTokens, CSharpAnonym*, collectOverridenMembers, isCalleInsideCalle, recordImpicit, CSharpImpicitCastKey, CSharpInheritCompletionWeighter, HidedOrOverrided* and getGlobalUsages.

🟡 New inline comments

  1. CSharpSearchUtil.java:104: this PR introduces a new typo, until we don make. The suggestion changes it to until we make.
  2. CSharpReferenceExpressionImplUtil.java:1117: the new comment uses "if" where the original meant "because". That changes the meaning, and the suggestion restores it.
  3. CSharpReferenceExpressionImplUtil.java:93: a naming nit on ParametrizedValue. The class is a per-qualifier resolve cache, so a name like QualifierResolveCache would be clearer.

Still open from the last review (optional)

I didn't re-post these because the earlier threads are still open:

  • The PrefixOperatorEvaluator message wording.
  • The leftover "Searching for " + "overridden" concatenation.
  • rparenthOffset next to lParenthOffset.
  • The leftover typos Hided… and CSharpPreprocessorHightlightLexer.
  • The note that renaming public API (visitAnonymousMethodExpression, collectOverriddenMembers and others) can break other plugins.

None of these block the merge. If the build and tests pass, the PR looks good to merge.

final int parameterSize)
{
//TODO [VISTALL] some hack until we dont make override more powerfull
//TODO [VISTALL] some hack until we don make override more powerful

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Typo introduced by this PR (don instead of do not). The original "until we dont make" was also a double negative. This is what is meant:

Suggested change
//TODO [VISTALL] some hack until we don make override more powerful
//TODO [VISTALL] some hack until we make override more powerful

if(completion)
{
// append generic when completion due at ANY_MEMBER it dont resolved
// append generic on completion if at ANY_MEMBER it isn't resolved

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The original due at ANY_MEMBER it dont resolved meant because generic parameters are not resolved at ANY_MEMBER. With if, it reads like a runtime condition, which it is not:

Suggested change
// append generic on completion if at ANY_MEMBER it isn't resolved
// Append generic parameters on completion, because they are not resolved at ANY_MEMBER

}

private static class ParamatizeValue
private static class ParametrizedValue

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nit: ParamatizeValue → ParametrizedValue fixes the typo, but this class caches resolve results keyed by qualifier element, and neither name says that. Something like QualifierResolveCache would be clearer. It is private, so the rename is safe. If you keep this name, "Parameterized" is the more common spelling.

@unv-unv

unv-unv commented Oct 15, 2026

Copy link
Copy Markdown
Contributor Author

@claude review pr with inline comments

@github-actions

github-actions Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @unv-unv's task in 1m 2s —— View job


Re-review of PR #617: Fixing typos (round 3)

  • Gather context (diff vs origin/master)
  • Re-check issues from earlier reviews
  • Scan the full diff for new problems
  • Post inline comments: none needed this round
  • Final summary

I didn't run the Maven build or the tests. I checked every changed line in the diff by reading it.

✅ Fixed since the last review

  • CSharpSearchUtil.java:104 now reads until we make override more powerful. The don typo and the double negative are both gone.
  • CSharpReferenceExpressionImplUtil.java:1117 now says "because they are not resolved at ANY_MEMBER", so the original meaning is back.
  • All earlier blocking items are still fixed: the .flex lexers use CSharpPreprocessorTokens, Issue267.txt expects CSharpAnonymousFieldOrPropertySetImpl(ANONYMOUS_FIELD_OR_PROPERTY_SET), and getGlobalUsings is restored.

New problems

None. The other changes all look right:

  • Renames that are applied consistently: CSharpImplicitCastKey, recordImplicit, CSharpInheritCompletionWeigher, isNestedCall, ARRAY_INITIALIZER, DICTIONARY_INITIALIZER, myNullableCacheValue, qName, implicitCastResolveScope.
  • The imports removed from CSharpInheritorsCodeVisionProvider (CSharpConstructorDeclaration, DotNetModifierListOwner) were unused.
  • The new CSharpStubVariableImplUtil log message is accurate: it fires when the first declarator in int a, b has no type.
  • The UI string fixes (Keywords//…, Interface name, Class Fields & …, Index method left brace) look right. One thing to know: the color-settings group names are user-visible.

Still open (optional, not re-posted)

The earlier threads for these are still open:

  • PrefixOperatorEvaluator: the wording of the '!' message.
  • HidedOrOverriddenElementCollector:113: the leftover "Searching for " + "overridden" concatenation, and the Hided typo in the class name.
  • rparenthOffset next to lParenthOffset.
  • CSharpPreprocessorHightlightLexer.
  • The deprecated-bridge note for the public API renames.
  • Also: CSharpCompilerChecks still uses cant in about 25 comments. That spelling was there before this PR, so fixing it is up to you.

Nothing blocks the merge. If CI builds and the tests pass, this looks good to merge.

@VISTALL
VISTALL merged commit 15ad21b into consulo:master Oct 15, 2026
1 check passed
@unv-unv
unv-unv deleted the typos branch October 15, 2026 10:07
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