Skip to content

Commit

Permalink
Update logging to say information instead of info, matching pyright
Browse files Browse the repository at this point in the history
  • Loading branch information
jakebailey committed May 5, 2022
1 parent ec4286f commit b84ba6a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6497,7 +6497,7 @@ async function main() {
}, message);
});
const { errorCount, warningCount, informationCount } = report.summary;
core2.info(`${errorCount} ${errorCount === 1 ? "error" : "errors"}, ${warningCount} ${warningCount === 1 ? "warning" : "warnings"}, ${informationCount} ${informationCount === 1 ? "info" : "infos"}`);
core2.info(`${errorCount} ${errorCount === 1 ? "error" : "errors"}, ${warningCount} ${warningCount === 1 ? "warning" : "warnings"}, ${informationCount} ${informationCount === 1 ? "information" : "informations"}`);
if (status !== 0) {
core2.setFailed(`${errorCount} ${errorCount === 1 ? "error" : "errors"}`);
}
Expand Down
6 changes: 3 additions & 3 deletions src/__snapshots__/main.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ Array [
"/path/to/node /path/to/pyright/dist/index.js --outputjson",
],
Array [
"0 errors, 0 warnings, 0 infos",
"0 errors, 0 warnings, 0 informations",
],
]
`;
Expand Down Expand Up @@ -316,7 +316,7 @@ Array [
"/path/to/file3.py:1:1 - information: some info (reportSomeInformation)",
],
Array [
"1 error, 1 warning, 1 info",
"1 error, 1 warning, 1 information",
],
]
`;
Expand Down Expand Up @@ -416,7 +416,7 @@ Array [
"/path/to/file1.py:6:10 - error: some error",
],
Array [
"2 errors, 2 warnings, 1 info",
"2 errors, 2 warnings, 1 information",
],
]
`;
Expand Down
2 changes: 1 addition & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export async function main() {
core.info(
`${errorCount} ${errorCount === 1 ? 'error' : 'errors'}, ` +
`${warningCount} ${warningCount === 1 ? 'warning' : 'warnings'}, ` +
`${informationCount} ${informationCount === 1 ? 'info' : 'infos'}`
`${informationCount} ${informationCount === 1 ? 'information' : 'informations'}`
);

if (status !== 0) {
Expand Down

0 comments on commit b84ba6a

Please sign in to comment.