Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ From inside the project root, run:
- `composer install`
- `docker-compose up -d --build`

Visit [midcamp.org.docker.amazee.io](http://midcamp.org.docker.amazee.io) in your browser of choice. At this point you should see a Drupal installation page. See below for Drush commands to install the site.
Visit [midcamp.org.docker.amazee.io](http://midcamp.org.docker.amazee.io) in your browser of choice. At this point you should see a Drupal installation page. See below for Drush commands to install the site.

## How do I work on this?

Expand Down Expand Up @@ -101,8 +101,19 @@ Butler is tool to automate front-end development tasks and streamline prototypin

*Note: When you are deploying, Butler will ask you for your GitHub credentials at least once, possibly multiple times. Enter your own GitHub credentials as prompted.*

## Code Linting

### Patching modules
[GrumPHP](https://github.com/phpro/grumphp) is included for linting and enforcing Drupal code quality standards. This will run on a Git `pre-commit` hook based on the files you are attempting to commit. When you run `git commit -m "My message"` GrumPHP will check your code and potentially prevent you from committing until issues are resolved.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have... feelings about this... the one other project I'm on that uses pre-commit hooks takes close to a minute to run checks and it's... a pain to work with. I'd much rather run checks in CI, where I don't get yelled at until I'm asking to be, but I'm open to discussion here, as this is definitely a much smaller project and I'd imagine the checks take much less time.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm certainly up for further discussion on it, but these don't take much time at all in here at the minute (a few seconds). I would love to have real CI one day...


Additionally, you can run commands directly against files or directories with the following commands:

- `vendor/bin/phpcs --standard=Drupal path/to/something/to/lint`: Runs PHP Code Sniffer. Pass it a file or a directory to inspect.
- `vendor/bin/phpcbf --standard=Drupal path/to/something/to/fix`: Runs PHP Code Beautifier and Fixer. Pass it a file or a directory to fix.

If you need to commit something you know is breaking the rules, you can pass the `-n` or `--no-verify` flag when you commit.


## Patching modules

Sometimes we need to apply patches from the Drupal.org issue queues. These patches should be applied using composer using the [Composer Patches](https://github.com/cweagans/composer-patches) composer plugin.

Expand Down
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@
"drupal/drupal-extension": "^3.1",
"drush/drush": "^8.0",
"palantirnet/palantir-behat-extension": "dev-drupal8-file-revisited",
"phpmd/phpmd": "^2.4"
"phpmd/phpmd": "^2.4",
"vijaycs85/drupal-quality-checker": "^1.0"
},
"conflict": {
"drupal/drupal": "*"
Expand Down
Loading