Skip to content

Commit

Permalink
feat: add php mess detector
Browse files Browse the repository at this point in the history
  • Loading branch information
EdieLemoine committed Jul 29, 2022
0 parents commit df9abe2
Show file tree
Hide file tree
Showing 17 changed files with 4,703 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @myparcelnl/integration
16 changes: 16 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
version: 2
updates:
- package-ecosystem: 'github-actions'
directory: '/'
schedule:
interval: 'daily'

- package-ecosystem: 'npm'
directory: '/'
schedule:
interval: 'daily'

- package-ecosystem: 'composer'
directory: '/'
schedule:
interval: 'daily'
11 changes: 11 additions & 0 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: 'Release 🚀'

on:
push:
branches:
- main

jobs:
release:
uses: myparcelnl/actions/.github/workflows/--semantic-release.yml@v2
secrets: inherit
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
node_modules
vendor

.*.cache
.DS_Store
yarn-*.log
8 changes: 8 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

144 changes: 144 additions & 0 deletions .idea/inspectionProfiles/Project_Default.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/jsLibraryMappings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 23 additions & 0 deletions .idea/mypa-devtools.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

45 changes: 45 additions & 0 deletions .idea/php.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

38 changes: 38 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# MyParcel PHP DevTools

These tools are used to make a consistent php workflow.

## Installation

```bash
composer require --dev myparcelnl/devtools
```

## Included tools

- [PHPMD](#PHPMD)

## Configuration

### PHPMD

Create a new file in your project root called `phpmd.xml`.

Paste the following content into it:

```xml
<?xml version="1.0"?>
<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
name="MyParcel"
xmlns="http://pmd.sf.net/ruleset/1.0.0"
xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 https://pmd.sourceforge.io/ruleset_xml_schema.xsd"
xsi:noNamespaceSchemaLocation="https://pmd.sourceforge.io/ruleset_xml_schema.xsd">
<description />

<rule ref="vendor/myparcelnl/devtools/phpmd.xml">
<exclude name="StaticAccess" />
</rule>
</ruleset>
```

Then set up your IDE so PHPMD inspections are enabled.
16 changes: 16 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"name": "myparcelnl/devtools",
"version": "0.0.0",
"description": "Dev tools for linting and analysing php projects.",
"require": {
"php": ">= 7",
"phpmd/phpmd": ">= 2.0"
},
"license": "MIT",
"authors": [
{
"name": "Edie Lemoine",
"email": "[email protected]"
}
]
}
Loading

0 comments on commit df9abe2

Please sign in to comment.