Class: FlutterRb::PluginPubspecLintsCheck

Inherits:
Check
  • Object
show all
Defined in:
lib/flutter_rb/checks/plugin_pubspec_check.rb

Overview

Check Flutter plugin lints dependency in pubspec file. Exists or not

Constant Summary

Constants inherited from Check

Check::UNIMPLEMENTED_ERROR

Instance Method Summary collapse

Instance Method Details

#check(project) ⇒ CheckReport

Parameters:

Returns:



169
170
171
172
173
174
175
176
177
178
179
180
# File 'lib/flutter_rb/checks/plugin_pubspec_check.rb', line 169

def check(project)
  pubspec = project.pubspec
  lints = pubspec.dev_dependencies&.detect do |dev_dependency|
    dev_dependency.name == 'lints'
  end
  CheckReport.new(
    name,
    lints.nil? ? CheckReportStatus::ERROR : CheckReportStatus::NORMAL,
    description,
    pubspec.path
  )
end

#descriptionString

Returns:

  • (String)


163
164
165
# File 'lib/flutter_rb/checks/plugin_pubspec_check.rb', line 163

def description
  'Check Flutter plugin lints dependency in pubspec file'
end

#nameString

Returns:

  • (String)


153
154
155
# File 'lib/flutter_rb/checks/plugin_pubspec_check.rb', line 153

def name
  'PluginPubspecLintsCheck'
end

#summaryString

Returns:

  • (String)


158
159
160
# File 'lib/flutter_rb/checks/plugin_pubspec_check.rb', line 158

def summary
  'Validate Flutter plugin\'s lints rules implementation in pubspec.yaml'
end