Skip to content

Conversation

xtqqczze
Copy link
Contributor

@xtqqczze xtqqczze commented Oct 17, 2025

@iSazonov iSazonov added the CL-CodeCleanup Indicates that a PR should be marked as a Code Cleanup change in the Change Log label Oct 18, 2025
@xtqqczze xtqqczze marked this pull request as ready for review October 18, 2025 18:57
@TravisEz13 TravisEz13 requested a review from Copilot October 20, 2025 18:27
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR enables the IDE0083 code style analyzer rule by upgrading it from "silent" to "warning" severity and refactors existing code to use the modern "is not" pattern syntax instead of the older "!(x is Type)" negated type check pattern. This improves code readability and aligns with current C# best practices.

Key changes:

  • Updated .globalconfig to enforce IDE0083 as a warning
  • Replaced negated type checks !(x is Type) with the cleaner x is not Type pattern across multiple files

Reviewed Changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated no comments.

Show a summary per file
File Description
.globalconfig Changed IDE0083 severity from silent to warning to enforce the pattern
src/System.Management.Automation/help/ProviderContext.cs Modernized type check pattern in provider help retrieval
src/System.Management.Automation/help/CommandHelpProvider.cs Modernized type check pattern in help data processing
src/System.Management.Automation/engine/parser/ast.cs Updated multiple type check patterns in AST-related methods including equality checks and value assignments
src/System.Management.Automation/engine/parser/TypeResolver.cs Modernized type check pattern in equality comparison
src/System.Management.Automation/engine/parser/TypeInferenceVisitor.cs Updated type check patterns in type inference logic
src/System.Management.Automation/engine/parser/SemanticChecks.cs Modernized type check patterns in semantic validation
src/System.Management.Automation/engine/parser/Position.cs Updated type check pattern in extent equality check
src/System.Management.Automation/engine/parser/Parser.cs Modernized type check patterns in hashtable parsing
src/System.Management.Automation/engine/parser/ConstantValues.cs Updated type check patterns in constant value visitors
src/System.Management.Automation/engine/parser/Compiler.cs Modernized type check patterns in binary expression compilation

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CL-CodeCleanup Indicates that a PR should be marked as a Code Cleanup change in the Change Log

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enable IDE0083: UseNotPattern

2 participants