Skip to content

Commit 96ee6a1

Browse files
committed
Clean code and fix ci
1 parent d7ad62d commit 96ee6a1

File tree

167 files changed

+570
-751
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

167 files changed

+570
-751
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -51,42 +51,6 @@ jobs:
5151
name: coverage-${{ matrix.os }}-${{ matrix.dotnet-version }}
5252
path: ./TestResults/**/coverage.cobertura.xml
5353

54-
code-coverage:
55-
name: Code Coverage Report
56-
runs-on: ubuntu-latest
57-
needs: build-and-test
58-
if: github.event_name == 'pull_request' || github.ref == 'refs/heads/main'
59-
60-
steps:
61-
- name: Checkout code
62-
uses: actions/checkout@v4
63-
64-
- name: Download coverage reports
65-
uses: actions/download-artifact@v4
66-
with:
67-
pattern: coverage-ubuntu-latest-9.0.x
68-
path: ./coverage
69-
70-
- name: Code Coverage Summary
71-
uses: irongut/[email protected]
72-
with:
73-
filename: ./coverage/**/coverage.cobertura.xml
74-
badge: true
75-
fail_below_min: false
76-
format: markdown
77-
hide_branch_rate: false
78-
hide_complexity: false
79-
indicators: true
80-
output: both
81-
thresholds: '60 80'
82-
83-
- name: Add Coverage PR Comment
84-
uses: marocchino/sticky-pull-request-comment@v2
85-
if: github.event_name == 'pull_request'
86-
with:
87-
recreate: true
88-
path: code-coverage-results.md
89-
9054
build-status:
9155
name: Build Status
9256
runs-on: ubuntu-latest

.github/workflows/code-quality.yml

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -34,28 +34,6 @@ jobs:
3434
- name: Run dotnet build analyzers
3535
run: dotnet build --configuration Release /p:TreatWarningsAsErrors=true
3636

37-
security:
38-
name: Security Scan
39-
runs-on: ubuntu-latest
40-
41-
steps:
42-
- name: Checkout code
43-
uses: actions/checkout@v4
44-
45-
- name: Run Trivy vulnerability scanner
46-
uses: aquasecurity/trivy-action@master
47-
with:
48-
scan-type: 'fs'
49-
scan-ref: '.'
50-
format: 'sarif'
51-
output: 'trivy-results.sarif'
52-
53-
- name: Upload Trivy results to GitHub Security
54-
uses: github/codeql-action/upload-sarif@v3
55-
if: always()
56-
with:
57-
sarif_file: 'trivy-results.sarif'
58-
5937
dependency-review:
6038
name: Dependency Review
6139
runs-on: ubuntu-latest

LanguageServer.Framework/Protocol/Capabilities/Client/ClientCapabilities/WindowClientCapabilities.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,4 @@ public class WindowClientCapabilities
3333
*/
3434
[JsonPropertyName("showDocument")]
3535
public ShowDocumentClientCapabilities? ShowDocument { get; init; }
36-
37-
3836
}

LanguageServer.Framework/Protocol/Capabilities/Client/MarkdownClientCapabilities.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@ namespace EmmyLua.LanguageServer.Framework.Protocol.Capabilities.Client;
44

55
public class MarkdownClientCapabilities
66
{
7-
/**
8-
* The name of the parser.
9-
*/
7+
/**
8+
* The name of the parser.
9+
*/
1010
[JsonPropertyName("parser")]
1111
public string Parser { get; set; } = null!;
1212

13-
/**
14-
* The version of the parser.
15-
*/
13+
/**
14+
* The version of the parser.
15+
*/
1616
[JsonPropertyName("version")]
1717
public string? Version { get; set; }
1818

@@ -24,4 +24,4 @@ public class MarkdownClientCapabilities
2424
*/
2525
[JsonPropertyName("allowedTags")]
2626
public string[]? AllowedTags { get; set; }
27-
}
27+
}

LanguageServer.Framework/Protocol/Capabilities/Client/TextDocumentClientCapabilities/DocumentSymbolClientCapabilities.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,3 @@ public class SymbolTagSupportClientCapabilities
6565
[JsonPropertyName("valueSet")]
6666
public List<SymbolTag>? ValueSet { get; init; }
6767
}
68-
69-
70-

LanguageServer.Framework/Protocol/Capabilities/Client/TextDocumentClientCapabilities/RenameClientCapabilities.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,5 +40,3 @@ public class RenameClientCapabilities
4040
[JsonPropertyName("honorsChangeAnnotations")]
4141
public bool? HonorsChangeAnnotations { get; init; }
4242
}
43-
44-

LanguageServer.Framework/Protocol/Capabilities/Client/TextDocumentClientCapabilities/SemanticTokensClientCapabilities.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,7 @@ public class SemanticTokensClientCapabilitiesRequests
9898
* The client will send the `textDocument/semanticTokens/full` request if
9999
* the server provides a corresponding server capability.
100100
*/
101-
[JsonPropertyName("full"), JsonConverter(typeof(BooleanOrConverter<SemanticTokensCapabilitiesFull>))]
101+
[JsonPropertyName("full")]
102+
[JsonConverter(typeof(BooleanOrConverter<SemanticTokensCapabilitiesFull>))]
102103
public BooleanOr<SemanticTokensCapabilitiesFull>? Full { get; init; }
103104
}
104-
105-

LanguageServer.Framework/Protocol/Capabilities/Client/TextDocumentClientCapabilities/TextDocumentClientCapabilities.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ public class TextDocumentClientCapabilities
211211
* @since 3.17.0
212212
*/
213213
[JsonPropertyName("diagnostic")]
214-
public DiagnosticClientCapabilities? Diagnostic { get; init; }
214+
public DiagnosticClientCapabilities? Diagnostic { get; init; }
215215

216216
/**
217217
* Capabilities specific to the `textDocument/inlineCompletion` request.

LanguageServer.Framework/Protocol/Capabilities/Client/WorkspaceEditClientCapabilities/ChangeAnnotationSupport.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ public record struct ChangeAnnotationSupport
1111
*/
1212
[JsonPropertyName("groupsOnLabel")]
1313
public bool? GroupsOnLabel { get; init; }
14-
}
14+
}

LanguageServer.Framework/Protocol/Capabilities/Client/WorkspaceEditClientCapabilities/FailureHandlingKind.cs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,32 +12,33 @@ public readonly record struct FailureHandlingKind(string Value)
1212
* stay executed.
1313
*/
1414
public static FailureHandlingKind Abort = new("abort");
15-
15+
1616
/**
1717
* All operations are executed transactionally. That means they either all
1818
* succeed or no changes at all are applied to the workspace.
1919
*/
2020
public static FailureHandlingKind Transactional = new("transactional");
21-
21+
2222
/**
2323
* If the workspace edit contains only textual file changes they are
2424
* executed transactionally. If resource changes (create, rename or delete
2525
* file) are part of the change the failure handling strategy is abort.
2626
*/
2727
public static FailureHandlingKind TextOnlyTransactional = new("textOnlyTransactional");
28-
28+
2929
/**
3030
* The client tries to undo the operations already executed. But there is no
3131
* guarantee that this is succeeding.
3232
*/
3333
public static FailureHandlingKind Undo = new("undo");
34-
34+
3535
public string Value { get; } = Value;
3636
}
3737

3838
public class FailureHandlingKindConverter : JsonConverter<FailureHandlingKind>
3939
{
40-
public override FailureHandlingKind Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
40+
public override FailureHandlingKind Read(ref Utf8JsonReader reader, Type typeToConvert,
41+
JsonSerializerOptions options)
4142
{
4243
return new FailureHandlingKind(reader.GetString()!);
4344
}
@@ -46,4 +47,4 @@ public override void Write(Utf8JsonWriter writer, FailureHandlingKind value, Jso
4647
{
4748
writer.WriteStringValue(value.Value);
4849
}
49-
}
50+
}

0 commit comments

Comments
 (0)