Skip to content

Commit

Permalink
Silence debug messages about some unexpected reasons.
Browse files Browse the repository at this point in the history
Specifically, the ones about compiler-artifact and
build-script-executed, which aren't actually unexpected.

Also adjust prettier print width to something a bit more
reasonable.
  • Loading branch information
adam-azarchs committed Dec 5, 2022
1 parent 7971dac commit 025759f
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .prettierrc.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module.exports = {
"arrowParens": "always",
"bracketSpacing": true,
"printWidth": 200,
"printWidth": 100,
"quoteProps": "as-needed",
"semi": true,
"singleQuote": false,
Expand Down
8 changes: 4 additions & 4 deletions dist/index.js

Large diffs are not rendered by default.

7 changes: 6 additions & 1 deletion src/outputParser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,12 @@ export class OutputParser {
}

if (contents.reason !== "compiler-message") {
core.debug(`Unexpected reason field, ignoring it: ${contents.reason}`);
if (
contents.reason !== "compiler-artifact" &&
contents.reason !== "build-script-executed"
) {
core.debug(`Unexpected reason field, ignoring it: ${contents.reason}`);
}
return;
}

Expand Down
6 changes: 5 additions & 1 deletion src/reporter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@ import type { AnnotationWithMessageAndLevel, Context, Stats } from "./schema";
import { AnnotationLevel } from "./schema";

export class Reporter {
public async report(stats: Stats, annotations: AnnotationWithMessageAndLevel[], context: Context): Promise<void> {
public async report(
stats: Stats,
annotations: AnnotationWithMessageAndLevel[],
context: Context,
): Promise<void> {
for (const annotation of annotations) {
switch (annotation.level) {
case AnnotationLevel.Error: {
Expand Down

0 comments on commit 025759f

Please sign in to comment.