Skip to content

Apply fixes from CodeFactor - #149

Merged
tonythethompson merged 3 commits into
masterfrom
master-cf-autofix
Aug 10, 2026
Merged

Apply fixes from CodeFactor#149
tonythethompson merged 3 commits into
masterfrom
master-cf-autofix

Conversation

@codefactor-io

@codefactor-io codefactor-io Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

This pull request applies fixes from code review by CodeFactor.


For more information, click here.

Review in cubic

@sourcery-ai sourcery-ai 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.

Sorry @codefactor-io[bot], you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

@codefactor-io

codefactor-io Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor Author

CodeFactor found an issue: Complex Method

It's currently on:
QuickShell.Core\Services\WorkspaceRepositorySnapshot.cs:92-158
Commit 092e765

@tonythethompson

Copy link
Copy Markdown
Owner

@greptile review

@greptile-apps

greptile-apps Bot commented Aug 10, 2026

Copy link
Copy Markdown

Greptile Summary

The PR applies automated formatting cleanups without changing application logic.

  • Removes excess blank lines across models, services, tests, and the settings window.
  • Adds parentheses to clarify arithmetic precedence in the logo generator.
  • Introduces inconsistent carriage-return whitespace in several formatted C# files.

Confidence Score: 4/5

The PR appears safe to merge functionally, but its inconsistent carriage-return formatting should be normalized first.

The code’s runtime behavior remains unchanged, while the only accepted issue is a non-blocking line-ending and trailing-whitespace regression that makes Git whitespace validation fail.

Files Needing Attention: QuickShell.Core/Services/TerminalHostIds.cs, QuickShell/Services/SectionListItems.cs, QuickShell.Run/QuickShellRunSettingsWindow.cs

Important Files Changed

Filename Overview
QuickShell.Core/Services/TerminalHostIds.cs Logic is unchanged, but the formatting rewrite introduces embedded carriage returns and fails whitespace validation.
QuickShell/Services/SectionListItems.cs Section-header behavior is unchanged, but mixed line endings collapse multiple logical lines in the diff.
QuickShell.Run/QuickShellRunSettingsWindow.cs The settings behavior is unchanged; many replacement blank lines contain whitespace flagged by Git.
scripts/LogoAssetGenerator/Program.cs Adds precedence-clarifying parentheses without changing the arithmetic results.

Fix All in Cursor Fix All in Claude Code Fix All in Codex Fix All in Devin

Prompt To Fix All With AI
### Issue 1
QuickShell.Core/Services/TerminalHostIds.cs:2
**Normalize introduced line endings**

The formatting pass introduces carriage-return whitespace throughout the changed source and joins several logical lines into single records in this file and `SectionListItems.cs`. This causes Git whitespace validation to fail and makes subsequent diffs and edits unnecessarily error-prone.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Reviews (1): Last reviewed commit: "[CodeFactor] Apply fixes" | Re-trigger Greptile

{
public const string LetWindowsChoose = "system";

internal static class TerminalHostIds{ public const string LetWindowsChoose = "system";

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Normalize introduced line endings

The formatting pass introduces carriage-return whitespace throughout the changed source and joins several logical lines into single records in this file and SectionListItems.cs. This causes Git whitespace validation to fail and makes subsequent diffs and edits unnecessarily error-prone.

Prompt To Fix With AI
This is a comment left during a code review.
Path: QuickShell.Core/Services/TerminalHostIds.cs
Line: 2

Comment:
**Normalize introduced line endings**

The formatting pass introduces carriage-return whitespace throughout the changed source and joins several logical lines into single records in this file and `SectionListItems.cs`. This causes Git whitespace validation to fail and makes subsequent diffs and edits unnecessarily error-prone.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Fix in Cursor Fix in Claude Code Fix in Codex Fix in Devin

Copilot AI 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.

Pull request overview

This pull request applies automated CodeFactor-driven cleanups across the QuickShell solution, primarily focused on formatting/clarity changes in C# sources and a small set of math-expression readability tweaks in the logo asset generator.

Changes:

  • Adds explicit parentheses in several arithmetic expressions in the logo poster rendering code to make operator precedence unambiguous.
  • Performs whitespace/blank-line cleanup across core services, models, the Run settings UI, and test files.
  • Reformats small helper utilities (e.g., section header list items) without intended behavioral changes.

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
scripts/LogoAssetGenerator/Program.cs Adds parentheses to clarify math precedence in poster layout calculations.
QuickShell/Services/SectionListItems.cs Reformats section-header helper; affected by line-ending/format rewrite.
QuickShell.Run/QuickShellRunSettingsWindow.cs Removes excess blank lines / whitespace in the settings window UI code.
QuickShell.Core/Services/WorkspaceRepositorySnapshot.cs Minor whitespace cleanup in scoring logic.
QuickShell.Core/Services/TerminalHostIds.cs Reformats terminal host ID helpers; affected by line-ending/format rewrite.
QuickShell.Core/Services/TerminalCatalog.cs Minor whitespace cleanup around interface implementations.
QuickShell.Core/Services/ShortcutLaunchFormJson.cs Whitespace cleanup in Adaptive Card JSON builder helpers.
QuickShell.Core/Models/WorkspaceSecurityMetadata.cs Removes a stray blank line.
QuickShell.Core/Models/TerminalShortcut.cs Whitespace cleanup within the core shortcut model.
QuickShell.Core.Tests/WorkspaceTrustCommandTests.cs Minor whitespace cleanup.
QuickShell.Core.Tests/TestQuickShellServicesFactory.cs Removes a trailing blank line.
QuickShell.Core.Tests/RunGlobalQueryTests.cs Whitespace cleanup in tests.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread QuickShell/Services/SectionListItems.cs Outdated

public static Separator CreateHeader(string sectionTitle) => new(sectionTitle);
}
/// <summary>/// Emits CmdPal section headers per PowerToys PR #43952: a <see cref="Separator"/> row/// (no command, non-empty section/title) renders the visible header; stamping/// <see cref="IListItem.Section"/> on normal items does not./// </summary>internal static class SectionListItems{ public static IEnumerable<IListItem> InSection(string sectionTitle, IEnumerable<IListItem> items) { var materialized = items.ToList();
Comment on lines 1 to 5
namespace QuickShell.Services;

internal static class TerminalHostIds
{
public const string LetWindowsChoose = "system";

internal static class TerminalHostIds{ public const string LetWindowsChoose = "system";
public const string WindowsTerminal = "wt";

public const string WindowsConsoleHost = "conhost";

public const string IntelligentTerminal = "it";
CodeFactor's formatting pass left bare CR and CRCRLF endings that collapsed braces onto single records and broke Git whitespace handling.

Co-authored-by: Cursor <cursoragent@cursor.com>
@greptile-apps

greptile-apps Bot commented Aug 10, 2026

Copy link
Copy Markdown

PR author is in the excluded authors list.

Extract match collection and ranking comparison so CodeFactor's Complex Method finding on the nested launch scan no longer applies.

Co-authored-by: Cursor <cursoragent@cursor.com>
@tonythethompson
tonythethompson enabled auto-merge (squash) August 10, 2026 12:57
@tonythethompson
tonythethompson merged commit b2c157d into master Aug 10, 2026
11 checks passed
@tonythethompson
tonythethompson deleted the master-cf-autofix branch August 10, 2026 13:02
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.

3 participants