mirror of
https://github.com/usetrmnl/terminus.git
synced 2026-08-13 14:29:27 -07:00
Necessary to lint Dockerfiles. link:https://github.com/hadolint/hadolint[Details]. This wires up support for local and remote (CI) linting so all bases are covered. The builds will fail if any issues are detected. Documentation is updated accordingly (which also fixes the bullets to use proper ASCII Doc syntax). Milestone: minor
31 lines
749 B
Ruby
31 lines
749 B
Ruby
# frozen_string_literal: true
|
|
|
|
require "bundler/setup"
|
|
require "git/lint/rake/register"
|
|
require "hanami/rake_tasks"
|
|
require "open3"
|
|
require "reek/rake/task"
|
|
require "rspec/core/rake_task"
|
|
require "rubocop/rake_task"
|
|
|
|
Git::Lint::Rake::Register.call
|
|
Reek::Rake::Task.new
|
|
RSpec::Core::RakeTask.new { |task| task.verbose = false }
|
|
RuboCop::RakeTask.new
|
|
|
|
Rake.add_rakelib "lib/tasks"
|
|
|
|
desc "Run Haskell Dockerfile Linter"
|
|
task :hadolint do
|
|
puts "Running Haskell Dockerfile Linter..."
|
|
|
|
Open3.capture3("hadolint Dockerfile").then do |stdout, _stderr, status|
|
|
status.success? ? puts("✓ No issues detected.") : abort(stdout)
|
|
end
|
|
end
|
|
|
|
desc "Run code quality checks"
|
|
task quality: %i[git_lint reek rubocop hadolint]
|
|
|
|
task default: %i[quality spec]
|