Class: Archsight::Linter
- Inherits:
-
Object
- Object
- Archsight::Linter
- Defined in:
- lib/archsight/linter.rb
Constant Summary collapse
- VALID_COMPONENTS =
Valid @component references in View annotations
%w[activity git jira languages owner repositories status].freeze
Instance Method Summary collapse
-
#initialize(database) ⇒ Linter
constructor
A new instance of Linter.
- #validate ⇒ Object
Constructor Details
#initialize(database) ⇒ Linter
Returns a new instance of Linter.
10 11 12 13 |
# File 'lib/archsight/linter.rb', line 10 def initialize(database) @database = database @errors = [] end |
Instance Method Details
#validate ⇒ Object
15 16 17 18 19 20 21 22 23 24 |
# File 'lib/archsight/linter.rb', line 15 def validate @database.instances.each_value do |instances_hash| instances_hash.each_value do |instance| validate_instance_annotations(instance) validate_view_fields(instance) if instance.klass == "View" end end @errors end |