From 0d7db68595813ae97c8e842a67f2e37531414dcb Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Thu, 11 Mar 2021 17:32:59 +0100 Subject: [PATCH] Apply suggestions from code review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Fredrik Adelöw Co-authored-by: Adam Harvey Signed-off-by: Patrik Oldsberg --- plugins/todo-backend/src/lib/TodoReader/TodoScmReader.ts | 4 +++- plugins/todo-backend/src/service/TodoReaderService.ts | 2 +- plugins/todo/README.md | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/plugins/todo-backend/src/lib/TodoReader/TodoScmReader.ts b/plugins/todo-backend/src/lib/TodoReader/TodoScmReader.ts index 316ac7840f..2a191d2cb4 100644 --- a/plugins/todo-backend/src/lib/TodoReader/TodoScmReader.ts +++ b/plugins/todo-backend/src/lib/TodoReader/TodoScmReader.ts @@ -129,7 +129,9 @@ export class TodoScmReader implements TodoReader { })), ); } catch (error) { - this.logger.error(`Failed to parse TODO in ${url}, ${error}`); + this.logger.error( + `Failed to parse TODO in ${url} at ${file.path}, ${error}`, + ); } } diff --git a/plugins/todo-backend/src/service/TodoReaderService.ts b/plugins/todo-backend/src/service/TodoReaderService.ts index 85949065e7..3965257eff 100644 --- a/plugins/todo-backend/src/service/TodoReaderService.ts +++ b/plugins/todo-backend/src/service/TodoReaderService.ts @@ -51,7 +51,7 @@ export class TodoReaderService implements TodoService { async listTodos(req: ListTodosRequest): Promise { if (!req.entity) { - throw new InputError('entity filter is required to list todos'); + throw new InputError('Entity filter is required to list TODOs'); } const entity = await this.catalogClient.getEntityByName(req.entity); if (!entity) { diff --git a/plugins/todo/README.md b/plugins/todo/README.md index aeaa72b3b9..8a8383b5f7 100644 --- a/plugins/todo/README.md +++ b/plugins/todo/README.md @@ -1,6 +1,6 @@ # @backstage/plugin-todo -This plugins lists `// TODO` comments in source code. It currently exports a single component extension for use on entity pages. +This plugin lists `// TODO` comments in source code. It currently exports a single component extension for use on entity pages. ## Extensions