Skip to content
Snippets Groups Projects
Commit 9e07b2c2 authored by Fabrice Gangler's avatar Fabrice Gangler :art:
Browse files

feat(Makefile): add rubocop and rubocop:autocorrect

parent 82e2f262
No related branches found
No related tags found
No related merge requests found
Pipeline #76597 canceled
install: clean bundle_install ## Clean + Install dependencies install: clean bundle_install ## Clean + Install dependencies
.PHONY: bundle_install .PHONY: bundle_install
...@@ -17,23 +16,33 @@ bundle_install: ## Install dependencies ...@@ -17,23 +16,33 @@ bundle_install: ## Install dependencies
bundle clean bundle clean
.PHONY: bundle_install .PHONY: bundle_install
linter: bundle_install ## Check syntax
autocorrect_rubocop: bundle_install ## Autocorrect RuboCop offenses (only when it's safe)
bundle exec rake rubocop:autocorrect
.PHONY: autocorrect_rubocop
rubocop: bundle_install ## Run RuboCop: a Ruby static code analyzer (a.k.a. linter) and code formatter
bundle exec rake rubocop
.PHONY: rubocop
linter: bundle_install ## Run all linter: RuboCop and syntax (manifests, templates, hiera)
bundle exec rake syntax lint metadata_lint check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop bundle exec rake syntax lint metadata_lint check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop
.PHONY: linter .PHONY: linter
unit_tests: bundle_install ## Run unit tests unit_tests: bundle_install ## Run unit tests
bundle exec rake parallel_spec bundle exec rake parallel_spec
.PHONY: linter .PHONY: linter
acceptance_tests: bundle_install ## Run acceptance tests acceptance_tests: bundle_install ## Run acceptance tests ---> FIXME
RUBY_VERSION='3.2.0' RUBY_VERSION='3.2.0' \
RBENV_VERSION=${RUBY_VERSION} RBENV_VERSION=${RUBY_VERSION} \
PUPPET_INSTALL_TYPE=agent PUPPET_INSTALL_TYPE=agent \
BEAKER_IS_PE='no' BEAKER_IS_PE='no' \
BEAKER_PUPPET_COLLECTION=puppet7 BEAKER_PUPPET_COLLECTION=puppet7 \
BEAKER_debug='true' BEAKER_debug='true' \
BEAKER_setfile="myhostname{hostname=comptoir.example.com}" BEAKER_HYPERVISOR=docker \
BEAKER_HYPERVISOR=docker BEAKER_setfile="myhostname{hostname=comptoir.example.com}" \
bundle exec rake beaker bundle exec rake beaker
.PHONY: acceptance_tests .PHONY: acceptance_tests
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment