Skip to content

Commit 021acbb

Browse files
committed
precommit update
1 parent 6e52186 commit 021acbb

4 files changed

Lines changed: 11 additions & 11 deletions

File tree

compiler/src/dmd/diagreport/glue.d

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,11 @@ void callEvent(ref dmd.errors.Diagnostic[] group) nothrow
3636
foreach (i, ref d; group)
3737
{
3838
auto diag = convert(d);
39-
diag.startMessage.id = i + 1;
39+
diag.startMessage.id = i + 1;
4040
diags ~= diag;
4141
messages ~= d.message;
4242
}
43-
43+
4444
event(cast(string) primary.loc.filename, cast(string) primary.loc.fileContent, diags, messages, null);
4545
}
4646

@@ -100,7 +100,7 @@ void event(string filename, string source, dmd.diagreport.defs.Diagnostic[] diag
100100
renderer.emitSquiggle = (string text) nothrow
101101
=> buf.printDiagnostic("\x1b[31m", text, "\x1b[0m");
102102
}
103-
else
103+
else
104104
{
105105
renderer.emitMargin = (string text) nothrow
106106
=> buf.printDiagnostic(text);
@@ -120,8 +120,8 @@ void event(string filename, string source, dmd.diagreport.defs.Diagnostic[] diag
120120
=> buf.printDiagnostic(text);
121121
renderer.emitSquiggle = (string text) nothrow
122122
=> buf.printDiagnostic(text);
123-
}
124-
123+
}
124+
125125
renderer.getSourceCode = (int lineNumber) nothrow @trusted
126126
{
127127
int idx = lineNumber - firstLineNumber;
@@ -178,7 +178,7 @@ void event(string filename, string source, dmd.diagreport.defs.Diagnostic[] diag
178178
fflush(stderr);
179179
}
180180

181-
// Split source into lines without Phobos
181+
// Split source into lines without Phobos
182182
private string[] splitLines(string source) nothrow
183183
{
184184
string[] result;
@@ -287,7 +287,7 @@ private int getTokenLength(const(char)[] text, size_t offset) nothrow @safe
287287
c == ',' || c == ';' || c == ')' || c == '(' ||
288288
c == ']' || c == '[' || c == '{' || c == '}')
289289
{
290-
if (count == 0) count = 1;
290+
if (count == 0) count = 1;
291291
break;
292292
}
293293
count++;

compiler/src/dmd/diagreport/renderer.d

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ private:
122122
// Build columnNumberFormat — e.g. "%3d" for a 3-digit max line number
123123
{
124124
int lineNumberLength = snprintf(null, 0, "%d", maxLineNumber);
125-
char[32] buf;
125+
char[32] buf;
126126
int n = snprintf(buf.ptr, buf.length, "%%%dd", lineNumberLength);
127127
columnNumberFormat = cast(string) buf[0 .. n+1].idup[0 .. n];
128128
}

compiler/src/dmd/errors.d

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ class ErrorSinkCompiler : ErrorSink
117117

118118
completedEvents.length = 0;
119119
}
120-
120+
121121
// Exit if there are no collected diagnostics
122122
if (!diagnostics.length) return;
123123

@@ -1145,4 +1145,4 @@ private void writeHighlights(Console con, ref const OutBuffer buf)
11451145
colors = true;
11461146
}
11471147
}
1148-
}
1148+
}

compiler/src/dmd/location.d

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ void writeSourceLoc(ref OutBuffer buf,
229229
case MessageStyle.sarif: // https://docs.oasis-open.org/sarif/sarif/v2.1.0/sarif-v2.1.0.html
230230
// No formatting needed here for SARIF
231231
break;
232-
case MessageStyle.diagreport:
232+
case MessageStyle.diagreport:
233233
break;
234234
}
235235
}

0 commit comments

Comments
 (0)