Skip to content

Commit

Permalink
Merge pull request #201 from loic425/features/make-lint
Browse files Browse the repository at this point in the history
Make lint command
  • Loading branch information
loic425 committed Jul 26, 2019
2 parents 2823e6d + 5a5b60e commit 87f06d3
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 17 deletions.
3 changes: 3 additions & 0 deletions Makefile.dist
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,8 @@ stop-default:

test-default: validate-all test-all

lint-default:
vendor/bin/php-cs-fixer fix src

%: %-default
@ true
6 changes: 3 additions & 3 deletions features/makefile/make_docs_build.feature
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
@makefile @cli
Feature: Use make docs build command
Feature: Using make docs build command
In order to build application docs
As a developer
I want to use make docs build command

Scenario: Use make docs build command
Scenario: Using make docs build command
Given I use default makefile commands
Then the command make "docs-build" should exist
And it should execute "sphinx-build"

Scenario: Override make docs build command
Scenario: Overriding make docs build command
When I override makefile "docs-build" command with "echo 'test'" and "make docs-build-default"
Then the command make "docs-build" should exist
And it should execute "echo 'test'"
Expand Down
6 changes: 3 additions & 3 deletions features/makefile/make_install.feature
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
@makefile @cli
Feature: Use make install command
Feature: Using make install command
In order to install application
As a developer
I want to use make install command

Scenario: Use make install command
Scenario: Using make install command
Given I use default makefile commands
Then the command make install should exist
And it should execute "composer install"
Expand All @@ -13,7 +13,7 @@ Feature: Use make install command
And it should execute "yarn install"
And it should execute "yarn build"

Scenario: Override make install command
Scenario: Overriding make install command
When I override makefile install command with "echo 'test'" and "make install-default"
Then the command make install should exist
And it should execute "echo 'test'"
Expand Down
17 changes: 17 additions & 0 deletions features/makefile/make_lint.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
@makefile @cli
Feature: Using make lint command
In order to fix coding standards
As a developer
I want to use make lint command

Scenario: Using make lint command
Given I use default makefile commands
Then the command make lint should exist
And it should execute "php-cs-fixer"

Scenario: Overriding make start command
When I override makefile lint command with "echo 'test'" and "make lint-default"
Then the command make lint should exist
And it should execute "echo 'test'"
And it should execute "make lint-default"
But it should not execute "php-cs-fixer"
6 changes: 3 additions & 3 deletions features/makefile/make_start.feature
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
@makefile @cli
Feature: Use make start command
Feature: Using make start command
In order to start server
As a developer
I want to use make start command

Scenario: Use make start command
Scenario: Using make start command
Given I use default makefile commands
Then the command make start should exist
And it should execute "server:start"

Scenario: Override make start command
Scenario: Overriding make start command
When I override makefile start command with "echo 'test'" and "make start-default"
Then the command make start should exist
And it should execute "echo 'test'"
Expand Down
6 changes: 3 additions & 3 deletions features/makefile/make_stop.feature
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
@makefile @cli
Feature: Use make stop command
Feature: Using make stop command
In order to stop server
As a developer
I want to use make stop command

Scenario: Use make stop command
Scenario: Using make stop command
Given I use default makefile commands
Then the command make stop should exist
And it should execute "server:stop"

Scenario: Override make stop command
Scenario: Overriding make stop command
When I override makefile stop command with "echo 'test'" and "make stop-default"
Then the command make stop should exist
And it should execute "echo 'test'"
Expand Down
10 changes: 5 additions & 5 deletions features/makefile/make_test.feature
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
@makefile @cli
Feature: Use make test command
Feature: Using make test command
In order to test application
As a developer
I want to use make test command

Scenario: Use make validate all command
Scenario: Using make validate all command
Given I use default makefile commands
Then the command make "validate-all" should exist
And it should execute "composer validate"
Expand All @@ -13,7 +13,7 @@ Feature: Use make test command
And it should execute "lint:twig"
And it should execute "lint:yaml"

Scenario: Use make test all command
Scenario: Using make test all command
Given I use default makefile commands
Then the command make "test-all" should exist
And it should execute "phpspec run"
Expand All @@ -23,7 +23,7 @@ Feature: Use make test command
And it should execute "infection"
And it should execute "behat"

Scenario: Use make test command
Scenario: Using make test command
Given I use default makefile commands
Then the command make test should exist
And it should execute "composer validate"
Expand All @@ -38,7 +38,7 @@ Feature: Use make test command
And it should execute "infection"
And it should execute "behat"

Scenario: Override make test command
Scenario: Overriding make test command
When I override makefile test command with "echo 'test'" and "make test-default"
Then the command make test should exist
And it should execute "echo 'test'"
Expand Down

0 comments on commit 87f06d3

Please sign in to comment.