Skip to content

Commit

Permalink
✏️ Space after line emoji
Browse files Browse the repository at this point in the history
  • Loading branch information
ValentinVignal committed Apr 25, 2021
1 parent e477688 commit 66f9d09
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 10 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ jobs:
uses: subosito/flutter-action@v1
- run: flutter pub get
- name: Analyze Flutter
uses: ValentinVignal/action-dart-analyze@v0.9
uses: ValentinVignal/action-dart-analyze@v0.10
with:
fail-on: 'warning'
```
9 changes: 2 additions & 7 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12504,7 +12504,7 @@ class AnalyzeResult {
failEmoji = `:${line.isFail ? 'x' : 'poop'}: `;
}
const highlight = line.isFail ? '**' : '';
comments.push(`- ${ActionOptions_1.actionOptions.emojis ? failEmoji + line.emoji : ''}${highlight}${line.originalLine.trim().replace(line.file, `\`${line.file}\``)}.${highlight} See ${urls}.`);
comments.push(`- ${ActionOptions_1.actionOptions.emojis ? failEmoji + line.emoji + ' ' : ''}${highlight}${line.originalLine.trim().replace(line.file, `\`${line.file}\``)}.${highlight} See ${urls}.`);
}
return comments.join('\n');
}
Expand Down Expand Up @@ -12746,7 +12746,7 @@ function analyze(params) {
console.log(`::${DartAnalyzeLogType_1.DartAnalyzeLogType.keyFromType(parsedLine.type)} ${message}`); // Log the issue
}
catch (error) {
console.log(`Error analyzing line ${line}:\n${error}`);
// This is not a log line
}
}
console.log('::endgroup::');
Expand Down Expand Up @@ -13593,11 +13593,6 @@ class ModifiedFiles {
core.setFailed(`The GitHub API for comparing the base and head commits for this ${utils_1.context.eventName} event returned ${response.status}, expected 200. ` +
"Please submit an issue on this action's GitHub repo.");
}
// Ensure that the head commit is ahead of the base commit.
if (response.data.status !== 'ahead') {
core.setFailed(`The head commit for this ${utils_1.context.eventName} event is not ahead of the base commit. ` +
"Please submit an issue on this action's GitHub repo.");
}
return response.data.files;
});
}
Expand Down
2 changes: 1 addition & 1 deletion src/analyze/AnalyzeResult.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export class AnalyzeResult {
failEmoji = `:${line.isFail ? 'x' : 'poop'}: `
}
const highlight = line.isFail ? '**': '';
comments.push(`- ${actionOptions.emojis ? failEmoji + line.emoji: ''}${highlight}${line.originalLine.trim().replace(line.file, `\`${line.file}\``)}.${highlight} See ${urls}.`);
comments.push(`- ${actionOptions.emojis ? failEmoji + line.emoji + ' ' : ''}${highlight}${line.originalLine.trim().replace(line.file, `\`${line.file}\``)}.${highlight} See ${urls}.`);
}
return comments.join('\n');
}
Expand Down
2 changes: 1 addition & 1 deletion src/analyze/analyze.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export async function analyze(params: {modifiedFiles: ModifiedFiles}): Promise<A
console.log(`::${DartAnalyzeLogType.keyFromType(parsedLine.type)} ${message}`); // Log the issue

} catch (error) {
console.log(`Error analyzing line ${line}:\n${error}`);
// This is not a log line
}
}
console.log('::endgroup::');
Expand Down

0 comments on commit 66f9d09

Please sign in to comment.