Skip to content

Commit

Permalink
fix: default values for missing fields
Browse files Browse the repository at this point in the history
Architecture diagnostics lack the line number and the message field is
named title.
  • Loading branch information
Rasmus-Bertell committed Sep 13, 2024
1 parent 2bb7cc0 commit d66482e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lua/lint/linters/phpinsights.lua
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ return {
for insight, severity in pairs(insight_to_severity) do
for _, message in ipairs(json[insight] or {}) do
table.insert(diagnostics, {
lnum = message.line - 1,
lnum = (message.line or 1) - 1,
col = 0,
message = message.message,
message = message.message or message.title,
severity = severity,
source = bin,
})
Expand Down

0 comments on commit d66482e

Please sign in to comment.