From 00937aa7e0ba1edbd5747755b69738b1cc27a082 Mon Sep 17 00:00:00 2001 From: Brandon Thetford Date: Tue, 25 Jun 2024 04:35:38 -0700 Subject: [PATCH 01/13] Add underscore-tolerant naming rule below the normal PascalCase rule --- Terminal.sln.DotSettings | 1 + 1 file changed, 1 insertion(+) diff --git a/Terminal.sln.DotSettings b/Terminal.sln.DotSettings index ac3b66baf..3291afc86 100644 --- a/Terminal.sln.DotSettings +++ b/Terminal.sln.DotSettings @@ -390,6 +390,7 @@ <Policy><Descriptor Staticness="Any" AccessRightKinds="Private" Description="Constant fields (private)"><ElementKinds><Kind Name="CONSTANT_FIELD" /></ElementKinds></Descriptor><Policy Inspect="True" Prefix="" Suffix="" Style="AA_BB" /></Policy> <Policy><Descriptor Staticness="Instance" AccessRightKinds="Protected, ProtectedInternal, Internal, Public, PrivateProtected" Description="Instance fields (not private)"><ElementKinds><Kind Name="FIELD" /><Kind Name="READONLY_FIELD" /></ElementKinds></Descriptor><Policy Inspect="True" Prefix="_" Suffix="" Style="aaBb" /></Policy> <Policy><Descriptor Staticness="Static" AccessRightKinds="Protected, ProtectedInternal, Internal, Public, PrivateProtected" Description="Static fields (not private)"><ElementKinds><Kind Name="FIELD" /></ElementKinds></Descriptor><Policy Inspect="True" Prefix="_" Suffix="" Style="aaBb" /></Policy> + <Policy><Descriptor Staticness="Any" AccessRightKinds="Any" Description="Types and namespaces"><ElementKinds><Kind Name="NAMESPACE" /><Kind Name="CLASS" /><Kind Name="STRUCT" /><Kind Name="ENUM" /><Kind Name="DELEGATE" /></ElementKinds></Descriptor><Policy Inspect="True" Prefix="" Suffix="" Style="AaBb"><ExtraRule Prefix="" Suffix="" Style="AaBb_AaBb" /></Policy></Policy> <Policy><Descriptor Staticness="Static" AccessRightKinds="Protected, ProtectedInternal, Internal, Public, PrivateProtected" Description="Static readonly fields (not private)"><ElementKinds><Kind Name="READONLY_FIELD" /></ElementKinds></Descriptor><Policy Inspect="True" Prefix="_" Suffix="" Style="aaBb" /></Policy> PushToShowHints True From 36813eb64eb2e9b561443c66d0b8c9e70ec81540 Mon Sep 17 00:00:00 2001 From: Brandon Thetford Date: Tue, 25 Jun 2024 05:01:48 -0700 Subject: [PATCH 02/13] New regex for BUG --- Terminal.sln.DotSettings | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Terminal.sln.DotSettings b/Terminal.sln.DotSettings index 3291afc86..0ada9ddcd 100644 --- a/Terminal.sln.DotSettings +++ b/Terminal.sln.DotSettings @@ -404,9 +404,10 @@ Suggestion (?<=\W|^)(?<TAG>SUGGESTION:)(\W|$)(.*) Question - (?<=\W|^)(?<TAG>BUG:|BUGBUG:)(\W|$)(.*) + False + (/{2}|/\*|\* ?)[\w\s\d:]*?\W(?<TAG>BUGBUG|BUG|PROBLEM): *(?<Message>[\S].*?)(?: ?\*/)?$ True - True + #FFCF9D32 True Performance From a8e54a6c72df38bc4b31bc717628b2904d523044 Mon Sep 17 00:00:00 2001 From: Brandon Thetford Date: Tue, 25 Jun 2024 05:00:59 -0700 Subject: [PATCH 03/13] New regex for SUGGESTION --- Terminal.sln.DotSettings | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Terminal.sln.DotSettings b/Terminal.sln.DotSettings index 0ada9ddcd..c03d25aa7 100644 --- a/Terminal.sln.DotSettings +++ b/Terminal.sln.DotSettings @@ -402,7 +402,7 @@ #FFCF9D32 True Suggestion - (?<=\W|^)(?<TAG>SUGGESTION:)(\W|$)(.*) + (/{2}|/\*|\* ?)[\w\s\d:]*?\W(?<TAG>SUGGESTION): *(?<Message>[\S].*?)(?: ?\*/)?$ Question False (/{2}|/\*|\* ?)[\w\s\d:]*?\W(?<TAG>BUGBUG|BUG|PROBLEM): *(?<Message>[\S].*?)(?: ?\*/)?$ From 0a26d51bea0bc2c50753bc77bc306cde64f5c47a Mon Sep 17 00:00:00 2001 From: Brandon Thetford Date: Tue, 25 Jun 2024 05:05:14 -0700 Subject: [PATCH 04/13] New regex for PERFORMANCE --- Terminal.sln.DotSettings | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Terminal.sln.DotSettings b/Terminal.sln.DotSettings index c03d25aa7..ad12e7f90 100644 --- a/Terminal.sln.DotSettings +++ b/Terminal.sln.DotSettings @@ -411,7 +411,7 @@ #FFCF9D32 True Performance - (?<=\W|^)(?<TAG>PERF:)(\W|$)(.*) + (/{2}|/\*|\* )[\w\s\d:]*?(?<TAG>PERFORMANCE|PERF): *(?<Message>[\S].*?)(?: ?\*/)?$ Warning True True From 3e28ed232aced73d5b13630130598feaa933edc6 Mon Sep 17 00:00:00 2001 From: Brandon Thetford Date: Tue, 25 Jun 2024 05:06:15 -0700 Subject: [PATCH 05/13] New regex for SECURITY --- Terminal.sln.DotSettings | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Terminal.sln.DotSettings b/Terminal.sln.DotSettings index ad12e7f90..5c3bc02cd 100644 --- a/Terminal.sln.DotSettings +++ b/Terminal.sln.DotSettings @@ -413,6 +413,12 @@ Performance (/{2}|/\*|\* )[\w\s\d:]*?(?<TAG>PERFORMANCE|PERF): *(?<Message>[\S].*?)(?: ?\*/)?$ Warning + True + #FFCF9D32 + True + Security Issue + (/{2}|/\*|\* ?)[\w\s\d:]*?\W(?<TAG>SECURITY|SEC): *(?<Message>[\S].*?)(?: ?\*/)?$ + Warning True True #FFCF9D32 From e502d846369a541cfa6f2a10b0f4e3d432651063 Mon Sep 17 00:00:00 2001 From: Brandon Thetford Date: Tue, 25 Jun 2024 05:07:13 -0700 Subject: [PATCH 06/13] New regex for NOTE --- Terminal.sln.DotSettings | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Terminal.sln.DotSettings b/Terminal.sln.DotSettings index 5c3bc02cd..52e0cbe1a 100644 --- a/Terminal.sln.DotSettings +++ b/Terminal.sln.DotSettings @@ -420,11 +420,10 @@ (/{2}|/\*|\* ?)[\w\s\d:]*?\W(?<TAG>SECURITY|SEC): *(?<Message>[\S].*?)(?: ?\*/)?$ Warning True - True #FFCF9D32 True Note - (?<=\W|^)(?<TAG>NOTE:)(\W|$)(.*) + (/{2}|/\*|\* ?)[\w\s\d:]*?\W(?<TAG>NOTE): *(?<Message>[\S].*?)(?: ?\*/)?$ Normal True True From e7524da6b302592895abc7c8dee1e9013d242155 Mon Sep 17 00:00:00 2001 From: Brandon Thetford Date: Tue, 25 Jun 2024 05:07:31 -0700 Subject: [PATCH 07/13] New regex for QUESTION --- Terminal.sln.DotSettings | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Terminal.sln.DotSettings b/Terminal.sln.DotSettings index 52e0cbe1a..6c4718be7 100644 --- a/Terminal.sln.DotSettings +++ b/Terminal.sln.DotSettings @@ -426,11 +426,10 @@ (/{2}|/\*|\* ?)[\w\s\d:]*?\W(?<TAG>NOTE): *(?<Message>[\S].*?)(?: ?\*/)?$ Normal True - True #FFCF9D32 True Question - (?<=\W|^)(?<TAG>QUESTION:)(\W|$)(.*) + (/{2}|/\*|\* ?)[\w\s\d:]*?\W(?<TAG>QUESTION|Q): *(?<Message>[\S].*?)(?: ?\*/)?$ Question True (?<=\W|^)(?<TAG>TODO:)(\W|$)(.*) From 3c72c5a646df4e85c0a3282f342509582c95fb84 Mon Sep 17 00:00:00 2001 From: Brandon Thetford Date: Tue, 25 Jun 2024 05:07:50 -0700 Subject: [PATCH 08/13] New regex for TODO --- Terminal.sln.DotSettings | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Terminal.sln.DotSettings b/Terminal.sln.DotSettings index 6c4718be7..1e3e17c3e 100644 --- a/Terminal.sln.DotSettings +++ b/Terminal.sln.DotSettings @@ -431,8 +431,7 @@ Question (/{2}|/\*|\* ?)[\w\s\d:]*?\W(?<TAG>QUESTION|Q): *(?<Message>[\S].*?)(?: ?\*/)?$ Question - True - (?<=\W|^)(?<TAG>TODO:)(\W|$)(.*) + (/{2}|/\*|\* ?)[\w\s\d:]*?\W(?<TAG>TODOTODO|TODO|TASK): *(?<Message>[\S].*?)(?: ?\*/)?$ True True #FFCF9D32 From 9ef8545127ea129636a51f9626d1c8aba852ce8f Mon Sep 17 00:00:00 2001 From: Brandon Thetford Date: Tue, 25 Jun 2024 05:08:07 -0700 Subject: [PATCH 09/13] New regex for INTENT --- Terminal.sln.DotSettings | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Terminal.sln.DotSettings b/Terminal.sln.DotSettings index 1e3e17c3e..691e9c99b 100644 --- a/Terminal.sln.DotSettings +++ b/Terminal.sln.DotSettings @@ -433,11 +433,10 @@ Question (/{2}|/\*|\* ?)[\w\s\d:]*?\W(?<TAG>TODOTODO|TODO|TASK): *(?<Message>[\S].*?)(?: ?\*/)?$ True - True #FFCF9D32 True Unclear Intent - (?<=\W|^)(?<TAG>UNCLEAR:|INTENT:)(\W|$)(.*) + (/{2}|/\*|\* ?)[\w\s\d:]*?\W(?<TAG>UNCLEAR|INTENT|CLARITY|SPECIFY): *(?<Message>[\S].*?)(?: ?\*/)?$ Warning True #FFCF9D32 From f13786f512e2d27d5920c82878754f5a52549701 Mon Sep 17 00:00:00 2001 From: Brandon Thetford Date: Tue, 25 Jun 2024 05:08:20 -0700 Subject: [PATCH 10/13] New regex for CONCURRENCY --- Terminal.sln.DotSettings | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Terminal.sln.DotSettings b/Terminal.sln.DotSettings index 691e9c99b..93db6a927 100644 --- a/Terminal.sln.DotSettings +++ b/Terminal.sln.DotSettings @@ -442,7 +442,7 @@ #FFCF9D32 True Concurrency Issue - (?<=\W|^)(?<TAG>CONCURRENCY:)(\W|$)(.*) + (/{2}|/\*|\* ?)[\w\s\d:]*?\W(?<TAG>CONCURRENCY|THREADSAFETY|THREADING): *(?<Message>[\S].*?)(?: ?\*/)?$ Warning True True From 22fe127522e6d63f3209b93eb357e71071ca1b2a Mon Sep 17 00:00:00 2001 From: Brandon Thetford Date: Thu, 27 Jun 2024 20:05:17 -0700 Subject: [PATCH 11/13] Add a settings layer to move and separate todo list settings to. --- Terminal.sln.DotSettings | 6 +++++- Terminal.sln.ToDo.DotSettings | 3 +++ 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 Terminal.sln.ToDo.DotSettings diff --git a/Terminal.sln.DotSettings b/Terminal.sln.DotSettings index 93db6a927..583c807e4 100644 --- a/Terminal.sln.DotSettings +++ b/Terminal.sln.DotSettings @@ -8,7 +8,6 @@ 2000 SUGGESTION ERROR - WARNING HINT SUGGESTION @@ -392,6 +391,11 @@ <Policy><Descriptor Staticness="Static" AccessRightKinds="Protected, ProtectedInternal, Internal, Public, PrivateProtected" Description="Static fields (not private)"><ElementKinds><Kind Name="FIELD" /></ElementKinds></Descriptor><Policy Inspect="True" Prefix="_" Suffix="" Style="aaBb" /></Policy> <Policy><Descriptor Staticness="Any" AccessRightKinds="Any" Description="Types and namespaces"><ElementKinds><Kind Name="NAMESPACE" /><Kind Name="CLASS" /><Kind Name="STRUCT" /><Kind Name="ENUM" /><Kind Name="DELEGATE" /></ElementKinds></Descriptor><Policy Inspect="True" Prefix="" Suffix="" Style="AaBb"><ExtraRule Prefix="" Suffix="" Style="AaBb_AaBb" /></Policy></Policy> <Policy><Descriptor Staticness="Static" AccessRightKinds="Protected, ProtectedInternal, Internal, Public, PrivateProtected" Description="Static readonly fields (not private)"><ElementKinds><Kind Name="READONLY_FIELD" /></ElementKinds></Descriptor><Policy Inspect="True" Prefix="_" Suffix="" Style="aaBb" /></Policy> + True + ..\Terminal.sln.ToDo.DotSettings + True + + 1 PushToShowHints True True diff --git a/Terminal.sln.ToDo.DotSettings b/Terminal.sln.ToDo.DotSettings new file mode 100644 index 000000000..75ce05fdd --- /dev/null +++ b/Terminal.sln.ToDo.DotSettings @@ -0,0 +1,3 @@ + + + \ No newline at end of file From 3f29a96b33f6219db81ac07fb396893f127c9cee Mon Sep 17 00:00:00 2001 From: Brandon Thetford Date: Thu, 27 Jun 2024 20:41:35 -0700 Subject: [PATCH 12/13] Split out the todo list items and unify their definitions --- Terminal.sln.DotSettings | 48 +-------------------- Terminal.sln.ToDo.DotSettings | 79 +++++++++++++++++++++++++++++++++++ 2 files changed, 80 insertions(+), 47 deletions(-) diff --git a/Terminal.sln.DotSettings b/Terminal.sln.DotSettings index 583c807e4..e83ed7026 100644 --- a/Terminal.sln.DotSettings +++ b/Terminal.sln.DotSettings @@ -394,7 +394,6 @@ True ..\Terminal.sln.ToDo.DotSettings True - 1 PushToShowHints True @@ -402,54 +401,9 @@ True True True - True - #FFCF9D32 - True - Suggestion - (/{2}|/\*|\* ?)[\w\s\d:]*?\W(?<TAG>SUGGESTION): *(?<Message>[\S].*?)(?: ?\*/)?$ - Question - False - (/{2}|/\*|\* ?)[\w\s\d:]*?\W(?<TAG>BUGBUG|BUG|PROBLEM): *(?<Message>[\S].*?)(?: ?\*/)?$ - True - - #FFCF9D32 - True - Performance - (/{2}|/\*|\* )[\w\s\d:]*?(?<TAG>PERFORMANCE|PERF): *(?<Message>[\S].*?)(?: ?\*/)?$ - Warning - True - #FFCF9D32 - True - Security Issue - (/{2}|/\*|\* ?)[\w\s\d:]*?\W(?<TAG>SECURITY|SEC): *(?<Message>[\S].*?)(?: ?\*/)?$ - Warning - True - #FFCF9D32 - True - Note - (/{2}|/\*|\* ?)[\w\s\d:]*?\W(?<TAG>NOTE): *(?<Message>[\S].*?)(?: ?\*/)?$ - Normal - True - #FFCF9D32 - True - Question - (/{2}|/\*|\* ?)[\w\s\d:]*?\W(?<TAG>QUESTION|Q): *(?<Message>[\S].*?)(?: ?\*/)?$ - Question - (/{2}|/\*|\* ?)[\w\s\d:]*?\W(?<TAG>TODOTODO|TODO|TASK): *(?<Message>[\S].*?)(?: ?\*/)?$ - True - #FFCF9D32 - True - Unclear Intent - (/{2}|/\*|\* ?)[\w\s\d:]*?\W(?<TAG>UNCLEAR|INTENT|CLARITY|SPECIFY): *(?<Message>[\S].*?)(?: ?\*/)?$ - Warning - True - #FFCF9D32 - True - Concurrency Issue - (/{2}|/\*|\* ?)[\w\s\d:]*?\W(?<TAG>CONCURRENCY|THREADSAFETY|THREADING): *(?<Message>[\S].*?)(?: ?\*/)?$ - Warning True True True True + True diff --git a/Terminal.sln.ToDo.DotSettings b/Terminal.sln.ToDo.DotSettings index 75ce05fdd..e72f67f03 100644 --- a/Terminal.sln.ToDo.DotSettings +++ b/Terminal.sln.ToDo.DotSettings @@ -1,3 +1,82 @@ + Bug + (?<=\W|^)(?<TAG>BUGBUG|BUG|PROBLEM): *(?<Message>[\S].*)$ + Warning + #FFD04040 + True + True + True + True + Concurrency Issue + (?<=\W|^)(?<TAG>CONCURRENCY|THREADSAFETY|THREADING): *(?<Message>[\S].*)$ + Warning + #FFC05030 + True + True + True + True + + Note + (?<=\W|^)(?<TAG>NOTE): *(?<Message>[\S].*)$ + Normal + #FF800080 + True + True + True + True + + Performance + (?<=\W|^)(?<TAG>PERFORMANCE|PERF): *(?<Message>[\S].*)$ + Warning + #FFFF6200 + True + True + True + True + + Question + (?<=\W|^)(?<TAG>QUESTION|Q): *(?<Message>[\S].*)$ + Question + #FF2040A0 + True + True + True + True + + Security Issue + (?<=\W|^)(?<TAG>SECURITY|SEC): *(?<Message>[\S].*)$ + Warning + #FFA02020 + True + True + True + True + + Suggestion + (?<=\W|^)(?<TAG>SUGGESTION): *(?<Message>[\S].*)$ + Question + #FF3090C0 + True + True + True + True + + ToDo + Question + (?<=\W|^)(?<TAG>TODOTODO|TODO|TASK): *(?<Message>[\S].*)$ + #FF229988 + True + True + True + True + + Unclear Intent + (?<=\W|^)(?<TAG>UNCLEAR|INTENT|CLARITY|SPECIFY): *(?<Message>[\S].*)$ + Warning + #FF999933 + True + True + True + True \ No newline at end of file From e45b7daf0e525d3254eea1ac7715ca0c9f0c82f6 Mon Sep 17 00:00:00 2001 From: Brandon Thetford Date: Thu, 27 Jun 2024 20:57:25 -0700 Subject: [PATCH 13/13] Provided one example of a skip working with it. Shows up in the to-do list as expected --- UnitTests/Views/ShortcutTests.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/UnitTests/Views/ShortcutTests.cs b/UnitTests/Views/ShortcutTests.cs index e545cde67..56e02a823 100644 --- a/UnitTests/Views/ShortcutTests.cs +++ b/UnitTests/Views/ShortcutTests.cs @@ -1,4 +1,4 @@ -using JetBrains.Annotations; +using JetBrains.Annotations; namespace Terminal.Gui.ViewsTests; @@ -362,7 +362,7 @@ public class ShortcutTests // " C 0 A " [InlineData (-1, 0, 0)] [InlineData (0, 1, 1)] - [InlineData (1, 0, 1)] // BUGBUG: This should be 1,1,1. We need to fix the logic in the Shortcut class. + [InlineData (1, 1, 1, Skip = "BUGBUG: This breaks. We need to fix the logic in the Shortcut class.")] [InlineData (2, 1, 1)] [InlineData (3, 1, 1)] [InlineData (4, 1, 1)]