Skip to content

Conversation

molsonkiko
Copy link
Contributor

@molsonkiko molsonkiko commented Oct 2, 2024

This would address #93.

Previously CSVLint assumed that all files had fewer than int.MaxValue (2147483647) bytes, and any files longer than that would simply cause the plugin to crash.

This is OK (but far from ideal) if Notepad++ catches the crash, but if not, such a crash could cause Notepad++ to fail unexpectedly.

This commit implements a more graceful handling of too-large files, where the user is initially notified if they try to run a plugin command on a too-large file, and they can opt out of such notifications.

Whether or not the user is notified, all plugin commands will do nothing after they detect that the file is too large.

Previously CSVLint assumed that all files had length less than
    int.MaxValue (2147483647), and any files longer than that would simply cause the plugin to crash.
    This is OK if Notepad++ catches the crash, but if not, such a crash could cause Notepad++ to fail unexpectedly.
This commit implements a more graceful handling of too-large files, where the user is initially
    notified if they try to run a plugin command on a too-large file, and they can opt out of such notifications.
    Whether or not the user is notified, all plugin commands will do nothing after they detect that the file is too large.
Also reduce risk of null dereference on return value from Main.GetCurrentCsvDef,
rename that function to Main.TryGetCurrentCsvDef
it was auto-inserted by Visual Studio in an earlier commit
@BdR76 BdR76 merged commit c04157e into BdR76:master Aug 2, 2025
4 checks passed
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