Skip to content

Commit 3c5f0c7

Browse files
committed
Замечания от Сонара
1 parent 804a214 commit 3c5f0c7

File tree

6 files changed

+9
-30
lines changed

6 files changed

+9
-30
lines changed

src/OneScript.DebugProtocol/TcpServer/JsonDtoChannel.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ This Source Code Form is subject to the terms of the
1313

1414
namespace OneScript.DebugProtocol.TcpServer
1515
{
16-
public class JsonDtoChannel : IMessageChannel
16+
public sealed class JsonDtoChannel : IMessageChannel
1717
{
1818
private readonly IDebuggerClient _client;
1919
private readonly Stream _dataStream;

src/OneScript.DebugProtocol/TcpServer/StreamUtils.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ This Source Code Form is subject to the terms of the
99

1010
namespace OneScript.DebugProtocol.TcpServer
1111
{
12-
public class StreamUtils
12+
public static class StreamUtils
1313
{
1414
public static void ReadStream(Stream stream, byte[] buffer, int length)
1515
{

src/ScriptEngine/Libraries/UserAddedScript.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,9 @@ namespace ScriptEngine.Libraries
1515
/// </summary>
1616
public class UserAddedScript
1717
{
18-
public string Symbol;
19-
public string FilePath;
20-
public IExecutableModule Module;
18+
public string Symbol { get; set; }
19+
public string FilePath { get; set; }
20+
public string FileName { get; set; }
21+
public IExecutableModule Module { get; set; }
2122
}
2223
}

src/ScriptEngine/Machine/Contexts/EnumPropertyHolder.cs

Lines changed: 0 additions & 18 deletions
This file was deleted.

src/ScriptEngine/Machine/Debugger/DisabledDebugSession.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ This Source Code Form is subject to the terms of the
77

88
namespace ScriptEngine.Machine.Debugger
99
{
10-
public class DisabledDebugSession : IDebugSession
10+
public sealed class DisabledDebugSession : IDebugSession
1111
{
1212
public IBreakpointManager BreakpointManager { get; } = new NoOpBreakpointManager();
1313
public IThreadEventsListener ThreadManager { get; } = new NoOpThreadEventsListener();

src/ScriptEngine/Machine/MachineInstance.cs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2488,6 +2488,7 @@ private SymbolTable ExtractCompilerContext()
24882488
}
24892489
catch
24902490
{
2491+
// Алиас остается пустым
24912492
}
24922493
}
24932494

@@ -2501,7 +2502,7 @@ private SymbolTable ExtractCompilerContext()
25012502
}
25022503
}
25032504

2504-
ctx.PushScope(symbolScope, CreateScopeDescriptor(scope, thisScope, index));
2505+
ctx.PushScope(symbolScope, ScopeBindingDescriptor.FrameScope(index));
25052506
}
25062507

25072508
// Локальные переменные текущего фрейма
@@ -2515,11 +2516,6 @@ private SymbolTable ExtractCompilerContext()
25152516
return ctx;
25162517
}
25172518

2518-
private ScopeBindingDescriptor CreateScopeDescriptor(IAttachableContext scope, IAttachableContext thisScope, int index)
2519-
{
2520-
return ScopeBindingDescriptor.FrameScope(index);
2521-
}
2522-
25232519
[MethodImpl(MethodImplOptions.AggressiveInlining)]
25242520
private IAttachableContext ResolveBindingTarget(ModuleSymbolBinding binding)
25252521
{

0 commit comments

Comments
 (0)