Class: FlutterRb::PluginPubspecFlutterLintsCheck

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

Overview

Check Flutter plugin flutter_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:



202
203
204
205
206
207
208
209
210
211
212
213
# File 'lib/flutter_rb/checks/plugin_pubspec_check.rb', line 202

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

#descriptionString

Returns:

  • (String)


196
197
198
# File 'lib/flutter_rb/checks/plugin_pubspec_check.rb', line 196

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

#nameString

Returns:

  • (String)


186
187
188
# File 'lib/flutter_rb/checks/plugin_pubspec_check.rb', line 186

def name
  'PluginPubspecFlutterLintsCheck'
end

#summaryString

Returns:

  • (String)


191
192
193
# File 'lib/flutter_rb/checks/plugin_pubspec_check.rb', line 191

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