Class: FlutterRb::PluginPubspecEffectiveDartCheck

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

Overview

Check Flutter plugin Effective Dart dependency in pubspec file. Exists or not noinspection RubyClassModuleNamingConvention

Constant Summary

Constants inherited from Check

Check::UNIMPLEMENTED_ERROR

Instance Method Summary collapse

Instance Method Details

#check(project) ⇒ CheckReport

Parameters:

Returns:



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

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

#descriptionString

Returns:



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

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

#nameString

Returns:



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

def name
  'PluginPubspecEffectiveDartCheck'
end

#summaryString

Returns:



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

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