Class: FlutterRb::PluginPubspecEffectiveDartCheck

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

Overview

Check Flutter plugin Effective Dart depencency in pubspec file. Exists or not

Constant Summary

Constants inherited from Check

Check::UNIMPLEMENTED_ERROR

Instance Method Summary collapse

Instance Method Details

#check(project) ⇒ Object



135
136
137
138
139
140
141
142
143
144
145
146
# File 'lib/flutter_rb/checks/plugin_pubspec_check.rb', line 135

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

#descriptionObject



148
149
150
# File 'lib/flutter_rb/checks/plugin_pubspec_check.rb', line 148

def description
  'Check Flutter plugin Effective Dart depencency in pubspec file'
end

#nameObject



127
128
129
# File 'lib/flutter_rb/checks/plugin_pubspec_check.rb', line 127

def name
  'PluginPubspecEffectiveDartCheck'
end

#summaryObject



131
132
133
# File 'lib/flutter_rb/checks/plugin_pubspec_check.rb', line 131

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