Class: WayOfWorking::CodeLinting::Hdi::GithubAuditRule
- Inherits:
-
Audit::Github::Rules::Base
- Object
- Audit::Github::Rules::Base
- WayOfWorking::CodeLinting::Hdi::GithubAuditRule
- Defined in:
- lib/way_of_working/code_linting/hdi/github_audit_rule.rb
Overview
This rule checks for the MegaLinter workflow action and README badge.
Instance Method Summary collapse
Instance Method Details
#validate ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/way_of_working/code_linting/hdi/github_audit_rule.rb', line 13 def validate workflows = @client.workflows(@repo_name).workflows @errors << 'No HDI MegaLinter GitHub Action' unless workflows.map(&:name).include?('MegaLinter') @errors << 'No HDI MegaLinter README Badge' unless megalinter_badge? validate_repo_file_contains_source_file( '.github/linters/rubocop_defaults.yml', '.mega-linter.yml', '.rubocop' ) end |