Proto.finding: def of bolt@1.27.0.0 Import: import bolt@1.27.0.0/src/lsp/proto.bend as Proto Lines 87-93 of bolt@1.27.0.0/src/lsp/proto.bend: https://jend.leeeet.dev/read.txt?path=bolt@1.27.0.0/src/lsp/proto.bend&start_line=87&end_line=93 import Base import emerging-ezjson@1.2.0.0/main.bend as Ezjson import emerging-ezjson@1.2.0.0/src/value.bend as J import bolt@1.27.0.0/src/finding.bend as Lint import bolt@1.27.0.0/src/codes.bend as Codes import bolt@1.27.0.0/src/config.bend as Config import bolt@1.27.0.0/src/lsp/enc.bend as Enc # a graded lint finding as a diagnostic: an error or a warning by its level, # its stable code, and bolt(group:slug) as the source def finding(cc: Enc.Cols, gg: Lint.Graded) -> J.Json: Lint.Graded{level, Lint.Finding{path, line, col, len, +rule, msg}} = gg Ezjson.obj([("range", finding_range(cc, line, col, len)), ("severity", J.JNum{U32.show(Bool.pick(U32, Config.is_error(level), 1, 2))}), ("code", J.JStr{Codes.code(rule)}), ("source", J.JStr{Codes.source(rule)}), ("message", J.JStr{msg})]) Uses (14): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.pick https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Sigma https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.show https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/codes.bend&name=code https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/codes.bend&name=source https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/config.bend&name=is_error https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/finding.bend&name=Finding https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/finding.bend&name=Graded https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/lsp/enc.bend&name=Cols https://jend.leeeet.dev/definition.txt?path=bolt@1.27.0.0/src/lsp/proto.bend&name=finding_range https://jend.leeeet.dev/definition.txt?path=emerging-ezjson@1.3.0.0/main.bend&name=obj https://jend.leeeet.dev/definition.txt?path=emerging-ezjson@1.3.0.0/src/value.bend&name=Json