Skip to content

Commit 71e20b9

Browse files
authored
Fix SonarCloud recommendations (#12)
1 parent eb80687 commit 71e20b9

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,6 @@ WORKDIR /app
1616

1717
COPY --from=build-env /publish .
1818

19+
USER nonroot
20+
1921
ENTRYPOINT ["dotnet", "ValMati.StockBot.dll"]

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# StockBot
22

3-
[![Build](https://github.com/ValMati/StockBot/actions/workflows/build.yml/badge.svg?branch=master)](https://github.com/ValMati/StockBot/actions/workflows/build.yml)
3+
[![Build](https://github.com/ValMati/StockBot/actions/workflows/build.yml/badge.svg?branch=master)](https://github.com/ValMati/StockBot/actions/workflows/build.yml)
4+
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=ValMati_StockBot&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=ValMati_StockBot)
5+
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=ValMati_StockBot_OtherFiles&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=ValMati_StockBot_OtherFiles)
6+
47

58
A Telegram bot for accessing stock price data
69

src/ValMati.StockBot/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ async Task HandleUpdateAsync(ITelegramBotClient botClient, Update update, Cancel
6464
Log.Information("Received a '{messageText}' message in chat {chatId}.", messageText, chatId);
6565

6666
// Echo received message text
67-
Message sentMessage = await botClient.SendTextMessageAsync(
67+
_ = await botClient.SendTextMessageAsync(
6868
chatId: chatId,
6969
text: "You said:\n" + messageText,
7070
cancellationToken: cancellationToken);

0 commit comments

Comments
 (0)