Skip to content

Commit e45665a

Browse files
committed
Formatter
1 parent f21750d commit e45665a

File tree

3 files changed

+11
-7
lines changed

3 files changed

+11
-7
lines changed

src/haxeLanguageServer/features/haxe/DiagnosticsFeature.hx

+8-4
Original file line numberDiff line numberDiff line change
@@ -464,10 +464,14 @@ private typedef DiagnosticsMapKey = {code:Int, ?range:Range};
464464

465465
private class DiagnosticsMap<T> extends BalancedTree<DiagnosticsMapKey, T> {
466466
override function compare(k1:DiagnosticsMapKey, k2:DiagnosticsMapKey) {
467-
if (k1.code != k2.code) return k1.code - k2.code;
468-
if (k1.range == null && k2.range == null) return 0;
469-
if (k1.range == null) return -1;
470-
if (k2.range == null) return 1;
467+
if (k1.code != k2.code)
468+
return k1.code - k2.code;
469+
if (k1.range == null && k2.range == null)
470+
return 0;
471+
if (k1.range == null)
472+
return -1;
473+
if (k2.range == null)
474+
return 1;
471475

472476
final start1 = k1.range.start;
473477
final start2 = k2.range.start;

src/haxeLanguageServer/features/haxe/codeAction/diagnostics/CompilerErrorActions.hx

+1-2
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,7 @@ class CompilerErrorActions {
5151
}
5252

5353
if (context.haxeServer.haxeVersion.major >= 4 // unsuitable error range before Haxe 4
54-
&& diagnostic.range != null
55-
&& arg.contains("should be declared with 'override' since it is inherited from superclass")) {
54+
&& diagnostic.range != null && arg.contains("should be declared with 'override' since it is inherited from superclass")) {
5655
var pos = diagnostic.range.start;
5756
final document = context.documents.getHaxe(params.textDocument.uri);
5857
if (document.tokens != null) {

src/haxeLanguageServer/features/haxe/codeAction/diagnostics/UnresolvedIdentifierActions.hx

+2-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@ class UnresolvedIdentifierActions {
6666
}
6767

6868
static function createTypoActions(context:Context, params:CodeActionParams, diagnostic:Diagnostic, arg):Array<CodeAction> {
69-
if (diagnostic.range == null) return [];
69+
if (diagnostic.range == null)
70+
return [];
7071

7172
return [
7273
{

0 commit comments

Comments
 (0)