Class: Kamal::Lint::Checks::KamalParseError

Inherits:
Kamal::Lint::Check show all
Defined in:
lib/kamal/lint/checks/kamal_parse_error.rb

Overview

Opt-in: surfaces errors from Kamal's own loader as findings. Off by default because Kamal's parse-level validation is what kamal config is for — the linter's value-add is the cross-section checks. Enabled with --include-kamal-errors.

Instance Attribute Summary

Attributes inherited from Kamal::Lint::Check

#context

Instance Method Summary collapse

Methods inherited from Kamal::Lint::Check

applies_to?, id, #initialize, severity, since, title, until_version

Constructor Details

This class inherits a constructor from Kamal::Lint::Check

Instance Method Details

#callObject



16
17
18
19
20
21
22
23
24
# File 'lib/kamal/lint/checks/kamal_parse_error.rb', line 16

def call
  return [] unless context.include_kamal_errors
  return [] unless context.kamal_load_error

  [ finding(
    message: "kamal could not load this config: #{context.kamal_load_error.message}",
    line: 1
  ) ]
end