Skip to content

Commit

Permalink
+ rules satisfied
Browse files Browse the repository at this point in the history
  • Loading branch information
jinek committed Nov 21, 2023
1 parent 2866baa commit 6634e2b
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/Consolonia.PlatformSupport/WindowsConsole.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public Win32Console()
#region chatGPT

[StructLayout(LayoutKind.Sequential)]
public struct INPUT_RECORD
private struct INPUT_RECORD

Check warning on line 66 in src/Consolonia.PlatformSupport/WindowsConsole.cs

View workflow job for this annotation

GitHub Actions / build

"[InconsistentNaming] Name 'INPUT_RECORD' does not match rule 'Types and namespaces'. Suggested name is 'InputRecord'." on /home/runner/work/Consolonia/Consolonia/src/Consolonia.PlatformSupport/WindowsConsole.cs(66,2829)
{
public ushort EventType;
public UnionRecord Event;
Expand All @@ -80,20 +80,26 @@ public struct UnionRecord
}

[StructLayout(LayoutKind.Sequential)]
public struct KEY_EVENT_RECORD
internal struct KEY_EVENT_RECORD

Check notice on line 83 in src/Consolonia.PlatformSupport/WindowsConsole.cs

View workflow job for this annotation

GitHub Actions / build

"[MemberCanBePrivate.Global] Struct 'KEY_EVENT_RECORD' can be made private" on /home/runner/work/Consolonia/Consolonia/src/Consolonia.PlatformSupport/WindowsConsole.cs(83,3334)

Check warning on line 83 in src/Consolonia.PlatformSupport/WindowsConsole.cs

View workflow job for this annotation

GitHub Actions / build

"[InconsistentNaming] Name 'KEY_EVENT_RECORD' does not match rule 'Types and namespaces'. Suggested name is 'KeyEventRecord'." on /home/runner/work/Consolonia/Consolonia/src/Consolonia.PlatformSupport/WindowsConsole.cs(83,3350)
{
#pragma warning disable IDE1006
public bool bKeyDown;

Check notice on line 86 in src/Consolonia.PlatformSupport/WindowsConsole.cs

View workflow job for this annotation

GitHub Actions / build

"[MemberCanBePrivate.Global] Field 'bKeyDown' can be made private" on /home/runner/work/Consolonia/Consolonia/src/Consolonia.PlatformSupport/WindowsConsole.cs(86,3421)

Check notice on line 86 in src/Consolonia.PlatformSupport/WindowsConsole.cs

View workflow job for this annotation

GitHub Actions / build

"[FieldCanBeMadeReadOnly.Global] Field can be made readonly" on /home/runner/work/Consolonia/Consolonia/src/Consolonia.PlatformSupport/WindowsConsole.cs(86,3433)
#pragma warning restore IDE1006
// Other fields omitted for brevity
}

[StructLayout(LayoutKind.Sequential)]
public struct FOCUS_EVENT_RECORD
private struct FOCUS_EVENT_RECORD

Check warning on line 92 in src/Consolonia.PlatformSupport/WindowsConsole.cs

View workflow job for this annotation

GitHub Actions / build

"[InconsistentNaming] Name 'FOCUS_EVENT_RECORD' does not match rule 'Types and namespaces'. Suggested name is 'FocusEventRecord'." on /home/runner/work/Consolonia/Consolonia/src/Consolonia.PlatformSupport/WindowsConsole.cs(92,3603)
{
#pragma warning disable IDE1006
public bool bSetFocus;
#pragma warning restore IDE1006
}

[DllImport("kernel32.dll", SetLastError = true, CharSet = CharSet.Unicode)]
public static extern bool WriteConsoleInput(
#pragma warning disable CA5392
private static extern bool WriteConsoleInput(
#pragma warning restore CA5392
IntPtr hConsoleInput,
INPUT_RECORD[] lpBuffer,
uint nLength,
Expand Down

0 comments on commit 6634e2b

Please sign in to comment.