refactor: normalize log message grammar and capitalization (#89)
Problem: Log messages used inconsistent capitalization, punctuation, and phrasing — some started lowercase, some omitted periods, "Pending" was used instead of "task", and sync backend errors used ad-hoc formatting. Solution: Apply sentence case after backend prefixes, add trailing periods to complete sentences, rename "Pending" to "task", use `'Failed to <verb> <noun>: '` pattern for operation errors, and pluralize "Archived N task(s)" correctly.
This commit is contained in:
parent
abf3e52277
commit
012bd9b043
5 changed files with 28 additions and 28 deletions
|
|
@ -33,7 +33,7 @@ describe('sync', function()
|
|||
end
|
||||
pending.command('notreal')
|
||||
vim.notify = orig
|
||||
assert.are.equal('[pending.nvim]: Unknown Pending subcommand: notreal', msg)
|
||||
assert.are.equal('[pending.nvim]: Unknown subcommand: notreal', msg)
|
||||
end)
|
||||
|
||||
it('errors on unknown action for valid backend', function()
|
||||
|
|
@ -46,7 +46,7 @@ describe('sync', function()
|
|||
end
|
||||
pending.command('gcal notreal')
|
||||
vim.notify = orig
|
||||
assert.are.equal("[pending.nvim]: gcal backend has no 'notreal' action", msg)
|
||||
assert.are.equal("[pending.nvim]: gcal: No 'notreal' action.", msg)
|
||||
end)
|
||||
|
||||
it('lists actions when action is omitted', function()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue