-
-
Notifications
You must be signed in to change notification settings - Fork 445
Resolve conflicts #3928
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
Resolve conflicts #3928
Conversation
@check-spelling-bot Report🔴 Please reviewSee the 📂 files view, the 📜action log, or 📝 job summary for details.
See ❌ Event descriptions for more information. Forbidden patterns 🙅 (1)In order to address this, you could change the content to not match the forbidden patterns (comments before forbidden patterns may help explain why they're forbidden), add patterns for acceptable instances, or adjust the forbidden patterns themselves. These forbidden patterns matched content: s.b. workaround(s)
If the flagged items are 🤯 false positivesIf items relate to a ...
|
🥷 Code experts: Jack251970, onesounds Jack251970, onesounds have most 👩💻 activity in the files. See details
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame:
Activity based on git-commit:
Knowledge based on git-blame: ✨ Comment |
Be a legend 🏆 by adding a before and after screenshot of the changes you made, especially if they are around UI/UX. |
📝 WalkthroughWalkthroughNormalized file encodings by removing leading BOM/zero‑width characters from various C#, XAML, and project files across core, infrastructure, app, and plugins. No logic, control flow, or public API changes. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Suggested reviewers
Tip 🔌 Remote MCP (Model Context Protocol) integration is now available!Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats. ✨ Finishing Touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (5)
Flow.Launcher/SettingPages/Views/SettingsPanePluginStore.xaml (1)
328-351
: Whitelist resource keys in spelling config
Add “installbtn”, “uninstallbtn” and “updatebtn” to .github/actions/spelling/expect.txt so the spelling check no longer flags these valid resource keys.Flow.Launcher.Core/Resource/Internationalization.cs (2)
56-70
: Bug: System language is always forced to English.SystemLanguageCode is set inside the loop when matched, but then unconditionally reset to the default on Line 69. This breaks “System Language” selection for all non-English systems.
Apply:
- // Try to find a match in the available languages list + // Try to find a match in the available languages list foreach (var language in availableLanguages) { var languageCode = language.LanguageCode; if (string.Equals(languageCode, twoLetterCode, StringComparison.OrdinalIgnoreCase) || string.Equals(languageCode, threeLetterCode, StringComparison.OrdinalIgnoreCase) || string.Equals(languageCode, fullName, StringComparison.OrdinalIgnoreCase)) { SystemLanguageCode = languageCode; + break; } } - SystemLanguageCode = DefaultLanguageCode; + if (string.IsNullOrEmpty(SystemLanguageCode)) + SystemLanguageCode = DefaultLanguageCode;
353-367
: Bug: Early return prevents updating remaining plugins.Inside the foreach, a non-IPluginI18n plugin causes the method to return, skipping all subsequent plugins. Use continue.
- if (p.Plugin is not IPluginI18n pluginI18N) return; + if (p.Plugin is not IPluginI18n pluginI18N) continue;Flow.Launcher/MainWindow.xaml.cs (1)
821-821
: Fix CI failure: forbidden pattern “work around”.GitHub Actions fails on the phrase “work around”. Replace with “workaround”.
- // Initialize call twice to work around multi-display alignment issue- https://github.com/Flow-Launcher/Flow.Launcher/issues/2910 + // Initialize call twice to workaround multi-display alignment issue - https://github.com/Flow-Launcher/Flow.Launcher/issues/2910 ... - // Initialize call twice to work around multi-display alignment issue- https://github.com/Flow-Launcher/Flow.Launcher/issues/2910 + // Initialize call twice to workaround multi-display alignment issue - https://github.com/Flow-Launcher/Flow.Launcher/issues/2910Also applies to: 845-845
Plugins/Flow.Launcher.Plugin.Explorer/Views/ExplorerSettings.xaml.cs (1)
43-52
: Guard against invalid drop data before casting.On Drop,
GetData
may not bestring[]
; casting first can throw. Check presence before cast.private void AccessLinkDragDrop(string containerName, DragEventArgs e) { - var files = (string[])e.Data.GetData(DataFormats.FileDrop); + if (!e.Data.GetDataPresent(DataFormats.FileDrop)) + return; + var files = e.Data.GetData(DataFormats.FileDrop) as string[]; if (files == null || files.Length == 0) { return; }
🧹 Nitpick comments (13)
Plugins/Flow.Launcher.Plugin.WebSearch/Main.cs (1)
47-49
: Fix comment typo (“apear” ➜ “appear”).Purely cosmetic.
- // Action Keyword match apear on top + // Action keyword matches appear on topFlow.Launcher.Core/Plugin/PluginInstaller.cs (2)
107-112
: Silence spelling warnings for resource keys.installbtn/uninstallbtn/updatebtn are resource keys and safe to allow-list in your spelling checker config.
Use the same verification script provided in SettingsPanePluginStore.xaml to find your spelling config and occurrences. Then add these tokens to the allow/expect list.
Also applies to: 208-213, 272-278
196-199
: Minor comment typo.“don not” ➜ “do not”.
- return; // don not restart on failure + return; // do not restart on failurePlugins/Flow.Launcher.Plugin.Shell/Main.cs (1)
63-68
: Duplicate predicate in autocomplete filter.The same Title-equality check is performed twice; remove one for clarity and a tiny perf win.
- .Where(o => o.StartsWith(cmd, StringComparison.OrdinalIgnoreCase) && - !results.Any(p => o.Equals(p.Title, StringComparison.OrdinalIgnoreCase)) && - !results.Any(p => o.Equals(p.Title, StringComparison.OrdinalIgnoreCase))).ToList(); + .Where(o => o.StartsWith(cmd, StringComparison.OrdinalIgnoreCase) && + !results.Any(p => o.Equals(p.Title, StringComparison.OrdinalIgnoreCase))).ToList();Flow.Launcher.Infrastructure/Win32Helper.cs (1)
1-1
: Silence spelling warnings by allowlisting Win32/interop terms.Add these to the spell-check allowlist: Dwm, PInvoke, DWMWINDOWATTRIBUTE, DWMWA, SYSTEMBACKDROP, DWMSBT, TRANSIENTWINDOW, MAINWINDOW, TABBEDWINDOW, DWMWCP, DONOTROUND, ROUNDSMALL, GWL, toolbar, Wnd, WINTAB, Progman, WORKERW, SHELLDLL, hkl, LCIDTo, nqo, tsf, DWord, regionlanguage, Noto, noto, uxtheme.
Plugins/Flow.Launcher.Plugin.BrowserBookmark/Helper/FaviconHelper.cs (1)
58-68
: Create parent directory before saving favicon to avoid IO errors.If outputPath’s directory doesn’t exist, WriteAllBytes throws. Safe to ensure it first.
Apply:
public static void SaveBitmapData(byte[] imageData, string outputPath) { try { + var dir = Path.GetDirectoryName(outputPath); + if (!string.IsNullOrEmpty(dir) && !Directory.Exists(dir)) + Directory.CreateDirectory(dir); File.WriteAllBytes(outputPath, imageData); }Plugins/Flow.Launcher.Plugin.Explorer/Flow.Launcher.Plugin.Explorer.csproj (1)
1-1
: BOM removal is correct; no functional changes.Looks good as an encoding normalization.
To prevent BOM reappearing, consider enforcing UTF-8 without BOM via repo-wide settings:
- Add
.editorconfig
:charset = utf-8
- Add
.gitattributes
:*.{cs,csproj,xaml} text eol=lf working-tree-encoding=UTF-8
Plugins/Flow.Launcher.Plugin.Explorer/Views/ExplorerSettings.xaml.cs (4)
23-28
: Duplicate DataContext assignment.
DataContext = viewModel;
is set twice; keep one._viewModel = viewModel; - DataContext = viewModel; InitializeComponent(); - DataContext = viewModel; + DataContext = viewModel;
122-137
: Avoid index out of range when resizing columns.Add a defensive check that the GridView has at least two columns before assigning widths.
if (listView.View is not GridView gView) return; @@ - var col1 = 0.4; - var col2 = 0.6; - - gView.Columns[0].Width = workingWidth * col1; - gView.Columns[1].Width = workingWidth * col2; + if (gView.Columns.Count >= 2) + { + var col1 = 0.4; + var col2 = 0.6; + gView.Columns[0].Width = workingWidth * col1; + gView.Columns[1].Width = workingWidth * col2; + }
99-101
: Redundant null/empty check on a readonly field.
_expanders
is readonly and initialized in the ctor; the null/Count checks are unnecessary.- // Ensure _expanders is not null and contains items - if (_expanders == null || _expanders.Count == 0) return; + // Collapse other expanders + if (_expanders.Count == 0) return;
1-1
: Resolve spelling warnings in CI.CI flagged “Lbx/lbx”. Either rename to consistent casing or whitelist in the spell-check config.
If you want, I can open a follow-up PR to add “Lbx,lbx” to the dictionary/allowlist used by the Check Spelling action.
Flow.Launcher/Resources/CustomControlTemplate.xaml (1)
1158-1165
: Silence spell-check warning by whitelisting “Shdw”The GitHub Actions spell checker flags “Shdw” (used as x:Name for ThemeShadowChrome). Since this PR aims for no behavior changes, don’t rename; instead add “Shdw” to the spell-check allowlist (e.g., cspell.json/hunspell dictionary for the workflow). I can draft the small config change if you want.
Also applies to: 3587-3593, 3699-3705
Plugins/Flow.Launcher.Plugin.Explorer/ViewModels/ActionKeywordModel.cs (1)
1-1
: Prevent future BOM churn with repo-wide enforcement.
Add EditorConfig to standardize UTF-8 (no BOM) for C#/XAML to avoid reintroducing invisible leading chars.Apply (or merge into existing) .editorconfig:
+[# C#/XAML: enforce UTF-8 without BOM] +[*.{cs,csproj,xaml}] +charset = utf-8
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (21)
Flow.Launcher.Core/Plugin/PluginInstaller.cs
(1 hunks)Flow.Launcher.Core/Resource/Internationalization.cs
(1 hunks)Flow.Launcher.Infrastructure/UserSettings/Settings.cs
(1 hunks)Flow.Launcher.Infrastructure/Win32Helper.cs
(1 hunks)Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs
(1 hunks)Flow.Launcher/MainWindow.xaml.cs
(1 hunks)Flow.Launcher/PublicAPIInstance.cs
(1 hunks)Flow.Launcher/Resources/CustomControlTemplate.xaml
(1 hunks)Flow.Launcher/SettingPages/ViewModels/SettingsPaneGeneralViewModel.cs
(1 hunks)Flow.Launcher/SettingPages/ViewModels/SettingsPanePluginStoreViewModel.cs
(1 hunks)Flow.Launcher/SettingPages/Views/SettingsPanePluginStore.xaml
(1 hunks)Plugins/Flow.Launcher.Plugin.BrowserBookmark/ChromiumBookmarkLoader.cs
(1 hunks)Plugins/Flow.Launcher.Plugin.BrowserBookmark/FirefoxBookmarkLoader.cs
(1 hunks)Plugins/Flow.Launcher.Plugin.BrowserBookmark/Helper/FaviconHelper.cs
(1 hunks)Plugins/Flow.Launcher.Plugin.Explorer/Flow.Launcher.Plugin.Explorer.csproj
(1 hunks)Plugins/Flow.Launcher.Plugin.Explorer/Search/ResultManager.cs
(1 hunks)Plugins/Flow.Launcher.Plugin.Explorer/ViewModels/ActionKeywordModel.cs
(1 hunks)Plugins/Flow.Launcher.Plugin.Explorer/Views/ExplorerSettings.xaml.cs
(1 hunks)Plugins/Flow.Launcher.Plugin.Explorer/Views/PreviewPanel.xaml
(1 hunks)Plugins/Flow.Launcher.Plugin.Shell/Main.cs
(1 hunks)Plugins/Flow.Launcher.Plugin.WebSearch/Main.cs
(1 hunks)
🧰 Additional context used
🧠 Learnings (6)
📚 Learning: 2025-06-06T05:26:32.163Z
Learnt from: Jack251970
PR: Flow-Launcher/Flow.Launcher#3664
File: Plugins/Flow.Launcher.Plugin.BrowserBookmark/FirefoxBookmarkLoader.cs:326-326
Timestamp: 2025-06-06T05:26:32.163Z
Learning: In the Firefox bookmark loader (FirefoxBookmarkLoader.cs), using hardcoded Windows line endings ("\r\n") for splitting profiles.ini content is acceptable and platform-agnostic line splitting is not required.
Applied to files:
Plugins/Flow.Launcher.Plugin.BrowserBookmark/FirefoxBookmarkLoader.cs
📚 Learning: 2025-07-01T05:46:13.251Z
Learnt from: Jack251970
PR: Flow-Launcher/Flow.Launcher#3791
File: Flow.Launcher.Core/Plugin/PluginManager.cs:293-295
Timestamp: 2025-07-01T05:46:13.251Z
Learning: In Flow.Launcher.Core/Plugin/PluginManager.cs, when checking if a plugin is modified within the PluginManager class itself, prefer using the internal static PluginModified(string id) method directly rather than going through API.PluginModified() for better performance and architectural design.
Applied to files:
Flow.Launcher.Core/Plugin/PluginInstaller.cs
📚 Learning: 2025-07-06T12:21:37.947Z
Learnt from: Jack251970
PR: Flow-Launcher/Flow.Launcher#3572
File: Flow.Launcher/App.xaml.cs:214-216
Timestamp: 2025-07-06T12:21:37.947Z
Learning: In Flow Launcher, the UpdatePluginManifestAsync method in PluginsManifest.cs already has comprehensive internal try-catch handling that logs exceptions and returns false on failure rather than throwing, making external try-catch wrappers unnecessary.
Applied to files:
Flow.Launcher.Core/Plugin/PluginInstaller.cs
📚 Learning: 2024-10-08T15:52:58.573Z
Learnt from: taooceros
PR: Flow-Launcher/Flow.Launcher#2616
File: Flow.Launcher/Flow.Launcher.csproj:7-7
Timestamp: 2024-10-08T15:52:58.573Z
Learning: In the Flow Launcher project, the version number in the `Flow.Launcher.csproj` file is dynamically updated during the CI/CD process.
Applied to files:
Plugins/Flow.Launcher.Plugin.Explorer/Flow.Launcher.Plugin.Explorer.csproj
📚 Learning: 2024-11-03T07:40:11.014Z
Learnt from: Yusyuriv
PR: Flow-Launcher/Flow.Launcher#3057
File: Flow.Launcher.Core/Plugin/JsonRPCPluginSettings.cs:0-0
Timestamp: 2024-11-03T07:40:11.014Z
Learning: In Flow Launcher, when using Windows Forms dialogs (e.g., in `JsonRPCPluginSettings.cs`), path validation is enabled by default in `OpenFileDialog` and `FolderBrowserDialog`, preventing users from selecting invalid paths, but it's possible to opt out of this validation on individual dialogs.
Applied to files:
Plugins/Flow.Launcher.Plugin.Explorer/ViewModels/ActionKeywordModel.cs
📚 Learning: 2025-07-21T09:19:49.684Z
Learnt from: Jack251970
PR: Flow-Launcher/Flow.Launcher#3854
File: Flow.Launcher/App.xaml.cs:246-262
Timestamp: 2025-07-21T09:19:49.684Z
Learning: In Flow Launcher's App.xaml.cs, the asynchronous plugin initialization task (containing AbstractPluginEnvironment.PreStartPluginExecutablePathUpdate, PluginManager.LoadPlugins, PluginManager.InitializePluginsAsync, and AutoPluginUpdates) does not require additional try-catch error handling according to maintainer Jack251970, as these operations are designed to handle exceptions internally.
Applied to files:
Plugins/Flow.Launcher.Plugin.Explorer/ViewModels/ActionKeywordModel.cs
🧬 Code graph analysis (1)
Flow.Launcher/PublicAPIInstance.cs (2)
Flow.Launcher/Msg.xaml.cs (2)
System
(43-46)System
(62-91)Flow.Launcher/ViewModel/MainViewModel.cs (1)
System
(2243-2256)
🪛 GitHub Actions: Check Spelling
Flow.Launcher/SettingPages/Views/SettingsPanePluginStore.xaml
[warning] Spell check warnings: Unrecognized words: installbtn, uninstallbtn, updatebtn.
Plugins/Flow.Launcher.Plugin.BrowserBookmark/Helper/FaviconHelper.cs
[warning] Spell check warnings: Unrecognized word: Skia.
Plugins/Flow.Launcher.Plugin.Explorer/Search/ResultManager.cs
[warning] Spell check warnings: Unrecognized words: opendir, drv, totalspace, openresultfolder.
Plugins/Flow.Launcher.Plugin.Explorer/Views/ExplorerSettings.xaml.cs
[warning] Spell check warnings: Unrecognized words: Lbx, lbx.
Flow.Launcher/MainWindow.xaml.cs
[error] 821-821: Forbidden pattern detected: 'work around' matches a forbidden pattern (forbidden-pattern).
[warning] Spell check warnings: Unrecognized words detected: gamemode, positionreset, XRatio, YRatio, clocksb, iconsb, activing, mainwindow, Arrowkeys, excmd, CMDs, pwsh, RStroked, RPressed.
Flow.Launcher.Core/Plugin/PluginInstaller.cs
[warning] Spell check warnings: Unrecognized words detected: updatebtn, installbtn, zipfolder, Uninstalls, uninstallbtn, redownload.
Flow.Launcher.Infrastructure/Win32Helper.cs
[warning] Spell check warnings: Unrecognized words detected: Dwm, PInvoke, DWMWINDOWATTRIBUTE, DWMWA, SYSTEMBACKDROP, DWMSBT, TRANSIENTWINDOW, MAINWINDOW, TABBEDWINDOW, DWMWCP, DONOTROUND, ROUNDSMALL, GWL, toolbar, Wnd, WINTAB, Progman, WORKERW, SHELLDLL, hkl, LCIDTo, nqo, tsf, DWord, regionlanguage, Noto, noto, uxtheme.
Flow.Launcher/Resources/CustomControlTemplate.xaml
[warning] Spell check warnings: Unrecognized word: Shdw.
Plugins/Flow.Launcher.Plugin.Shell/Main.cs
[warning] Spell check warnings: Unrecognized words: excmd, CMDs, pwsh, RStroked, RPressed.
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
- GitHub Check: gitStream workflow automation
- GitHub Check: gitStream workflow automation
- GitHub Check: gitStream.cm
- GitHub Check: gitStream.cm
- GitHub Check: gitStream.cm
- GitHub Check: build
🔇 Additional comments (20)
Plugins/Flow.Launcher.Plugin.WebSearch/Main.cs (1)
1-1
: Encoding-only change confirmed.BOM removal only; no functional impact.
Flow.Launcher/SettingPages/ViewModels/SettingsPanePluginStoreViewModel.cs (1)
1-1
: Encoding-only change confirmed.BOM removal only; no logic changes.
Flow.Launcher/SettingPages/Views/SettingsPanePluginStore.xaml (1)
1-1
: Encoding-only change confirmed.BOM removal only; XAML unchanged.
Flow.Launcher/PublicAPIInstance.cs (1)
1-1
: Encoding-only change confirmed.BOM removal only; no functional impact.
Flow.Launcher.Core/Plugin/PluginInstaller.cs (1)
1-1
: Encoding-only change confirmed.BOM removal only; implementation untouched.
Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs (1)
1-1
: LGTM: BOM removal only.No functional changes. Safe to merge.
Plugins/Flow.Launcher.Plugin.Shell/Main.cs (1)
1-1
: LGTM: BOM removal only.No functional changes.
Flow.Launcher/MainWindow.xaml.cs (1)
1-1
: LGTM: BOM removal only.No functional changes.
Plugins/Flow.Launcher.Plugin.Explorer/Search/ResultManager.cs (1)
1-1
: LGTM: BOM removal only.No functional changes.
Flow.Launcher.Infrastructure/Win32Helper.cs (1)
1-1
: BOM removed — no functional changes. LGTM.Flow.Launcher.Infrastructure/UserSettings/Settings.cs (1)
1-1
: BOM removed — file contents unchanged. LGTM.Plugins/Flow.Launcher.Plugin.BrowserBookmark/Helper/FaviconHelper.cs (1)
1-1
: BOM removed — no functional changes. LGTM.Plugins/Flow.Launcher.Plugin.BrowserBookmark/ChromiumBookmarkLoader.cs (1)
1-1
: BOM removed — file behavior unchanged. LGTM.Plugins/Flow.Launcher.Plugin.BrowserBookmark/FirefoxBookmarkLoader.cs (2)
1-1
: BOM removed — no logic changes. LGTM.
273-277
: Note on line splitting style is acceptable per prior guidance.CRLF-based Split("\r\n") here stays consistent with earlier reviewer preference; no action needed.
Plugins/Flow.Launcher.Plugin.Explorer/Views/ExplorerSettings.xaml.cs (1)
1-1
: BOM removal only — safe.No behavioral change.
Flow.Launcher/Resources/CustomControlTemplate.xaml (1)
1-1
: BOM removed — LGTMNo functional or visual changes. Safe to merge.
Plugins/Flow.Launcher.Plugin.Explorer/ViewModels/ActionKeywordModel.cs (1)
1-1
: BOM/ZWSP removed; #nullable directive is now clean at BOF — good.
No functional changes. This prevents stray-invisible chars from confusing the preprocessor/parser.Flow.Launcher/SettingPages/ViewModels/SettingsPaneGeneralViewModel.cs (1)
1-1
: BOM removal only — safe.
Using directive now starts at the first byte; no logic or binding changes.Plugins/Flow.Launcher.Plugin.Explorer/Views/PreviewPanel.xaml (1)
1-1
: BOM removed at XAML start — looks good.
No namespace, binding, or layout changes; XAML parsing unaffected.
@@ -1,4 +1,4 @@ | |||
using System; | |||
using System; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Verification agent
🧩 Analysis chain
Enforce UTF-8 without BOM repo-wide to prevent regressions.
Add EditorConfig/Git attributes and verify no stray BOMs remain.
Proposed settings:
.editorconfig
root = true
[*]
end_of_line = crlf
insert_final_newline = true
[*.{cs,csproj,xaml,props,targets}]
charset = utf-8
.gitattributes
* text=auto
*.cs text
*.xaml text
*.csproj text
*.props text
*.targets text
Script to spot any remaining BOMs:
🏁 Script executed:
#!/bin/bash
# Find UTF-8 BOMs at start of files (excluding build artifacts)
rg -nU --hidden -g '!**/bin/**' -g '!**/obj/**' -g '!**/.git/**' '^\xEF\xBB\xBF' || true
Length of output: 89
🏁 Script executed:
#!/bin/bash
# Check for existing EditorConfig and Git attributes files
if [ -f .editorconfig ]; then echo ".editorconfig exists"; else echo ".editorconfig missing"; fi
if [ -f .gitattributes ]; then echo ".gitattributes exists"; else echo ".gitattributes missing"; fi
Length of output: 158
🏁 Script executed:
#!/bin/bash
# Display first 50 lines of .editorconfig and verify charset setting
echo "=== .editorconfig ==="
sed -n '1,50p' .editorconfig
grep -n '^charset' .editorconfig || echo "charset setting missing"
# Display first 50 lines of .gitattributes and verify text attributes
echo
echo "=== .gitattributes ==="
sed -n '1,50p' .gitattributes
grep -n 'text=' .gitattributes || echo "text attribute entries missing"
Length of output: 4311
Update .editorconfig and .gitattributes to enforce UTF-8 without BOM
- In .editorconfig (currently
charset = utf-8-bom
), change tocharset = utf-8
. - In .gitattributes, add explicit
*.cs text
,*.xaml text
,*.csproj text
,*.props text
and*.targets text
entries alongside* text=auto
.
Rerun the BOM detection script to confirm no stray BOMs remain.
🧰 Tools
🪛 GitHub Actions: Check Spelling
[warning] Spell check warnings: Unrecognized words detected: Dwm, PInvoke, DWMWINDOWATTRIBUTE, DWMWA, SYSTEMBACKDROP, DWMSBT, TRANSIENTWINDOW, MAINWINDOW, TABBEDWINDOW, DWMWCP, DONOTROUND, ROUNDSMALL, GWL, toolbar, Wnd, WINTAB, Progman, WORKERW, SHELLDLL, hkl, LCIDTo, nqo, tsf, DWord, regionlanguage, Noto, noto, uxtheme.
🤖 Prompt for AI Agents
Flow.Launcher.Infrastructure/Win32Helper.cs around lines 1 to 1: repository
.editorconfig currently sets charset = utf-8-bom and .gitattributes lacks
explicit text entries for some source types, causing stray BOMs; update
.editorconfig to set charset = utf-8 (no BOM), add the following entries to
.gitattributes alongside "* text=auto": "*.cs text", "*.xaml text", "*.csproj
text", "*.props text", "*.targets text", then re-save any affected files
(including Flow.Launcher.Infrastructure/Win32Helper.cs) encoded as UTF-8 without
BOM and rerun the BOM detection script to confirm no BOMs remain.
@@ -1,4 +1,4 @@ | |||
#nullable enable | |||
#nullable enable |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Verification agent
🧩 Analysis chain
Quick sanity check for any remaining BOMs.
Run this repo-safe scan; fails if any tracked file still starts with a UTF‑8 BOM.
🏁 Script executed:
#!/bin/bash
set -euo pipefail
python - <<'PY'
import subprocess, sys
files = subprocess.check_output(['git','ls-files']).decode().splitlines()
bad=[]
for f in files:
try:
with open(f,'rb') as fh:
if fh.read(3) == b'\xef\xbb\xbf':
bad.append(f)
except Exception:
pass
if bad:
print("Files starting with UTF-8 BOM:", len(bad))
print("\n".join(bad))
sys.exit(1)
print("OK: No UTF-8 BOM at file starts detected.")
PY
Length of output: 38918
Remove UTF-8 BOM from all tracked files
706 files still start with a UTF-8 BOM; strip the BOM from each file (e.g. via dos2unix --keepdate --remove-bom
) to satisfy the sanity check.
🤖 Prompt for AI Agents
In Plugins/Flow.Launcher.Plugin.Explorer/ViewModels/ActionKeywordModel.cs around
lines 1 to 1 the file begins with a UTF-8 BOM (byte order mark); remove the BOM
so the file starts with the "#nullable enable" text only. Open the file in an
editor that can save without BOM or run a tool like dos2unix --remove-bom (or
dos2unix --keepdate --remove-bom) on the file, verify it no longer contains the
BOM, then save and recommit the file so the sanity check passes.
Shouldn't have any actual changes.