Skip to content

Commit

Permalink
Establish quality standards (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
carstingaxion committed Jul 12, 2023
2 parents f642a9f + 7169aee commit 8b61dfa
Show file tree
Hide file tree
Showing 11 changed files with 260 additions and 185 deletions.
22 changes: 22 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# This file is for unifying the coding style for different editors and IDEs
# editorconfig.org

# WordPress Coding Standards
# https://make.wordpress.org/core/handbook/coding-standards/

root = true

[*]
charset = utf-8
indent_style = tab
indent_size = 4
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

[*.md]
trim_trailing_whitespace = false

[{*.json,*.yml}]
indent_style = space
indent_size = 2
17 changes: 17 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
version: 2
updates:

- package-ecosystem: "composer"
directory: "/"
schedule:
interval: "weekly"
# Increase the version requirements for Composer
# only when required
versioning-strategy: increase-if-necessary
# All explicitly defined dependencies.
allow:
- dependency-type: "direct"
open-pull-requests-limit: 10

# maybe interesting later
# https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#composer-repository
10 changes: 10 additions & 0 deletions .github/workflows/ft-issue-gardening.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: Issue gardening for figuren.theater

on:
issues:
types:
- opened
jobs:
call-workflow-ft-issue-gardening:
uses: figuren-theater/.github/.github/workflows/issue-gardening.yml@main
secrets: inherit
12 changes: 12 additions & 0 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Draft or update the next release

on:
push:
# branches to consider in the event; optional, defaults to all
branches:
- main

jobs:
call-workflow-release-drafter:
uses: figuren-theater/.github/.github/workflows/release-drafter.yml@main
secrets: inherit
11 changes: 11 additions & 0 deletions .github/workflows/update-changelog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: 'Update Changelog'

on:
release:
types: [released]

jobs:
call-workflow-update-changelog:
uses: figuren-theater/.github/.github/workflows/update-changelog.yml@main
secrets: inherit

12 changes: 12 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/build/
/node_modules
/vendor
*.sql
*.tar.gz
*.zip
/wiki
.vscode

# misc
.DS_Store
Thumbs.db
46 changes: 46 additions & 0 deletions .phpcs.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<?xml version="1.0"?>
<ruleset name="install.php">
<description>Coding standards for install.php</description>
<!--
<file>.</file> -->

<!--
<exclude-pattern>*/bin/*</exclude-pattern>
<exclude-pattern>*/tests/*</exclude-pattern>
<exclude-pattern>*/vendor/*</exclude-pattern>
-->

<!-- Use figuren.theater Coding Standards -->
<rule ref="figurentheater" />

<!-- Allow functions without namespace -->
<rule ref="HM.Functions.NamespacedFunctions">
<exclude name="HM.Functions.NamespacedFunctions.MissingNamespace" />
</rule>

<!-- Allow i18n without text-domain -->
<rule ref="WordPress.WP.I18n">
<exclude name="WordPress.WP.I18n.MissingArgDomain" />
</rule>

<!-- Allow side-effects -->
<rule ref="PSR1.Files.SideEffects">
<exclude name="PSR1.Files.SideEffects.FoundWithSymbols" />
</rule>

<!-- Allow direct DB interaction -->
<rule ref="WordPress.DB.DirectDatabaseQuery">
<exclude name="WordPress.DB.DirectDatabaseQuery.DirectQuery" />
<exclude name="WordPress.DB.DirectDatabaseQuery.NoCaching" />
</rule>

<!-- Allow the usage of users/usermeta -->
<rule ref="WordPressVIPMinimum.Functions.RestrictedFunctions">
<exclude name="WordPressVIPMinimum.Functions.RestrictedFunctions.user_meta_update_user_meta" />
</rule>
<rule ref="WordPressVIPMinimum.Variables.RestrictedVariables">
<exclude name="WordPressVIPMinimum.Variables.RestrictedVariables.user_meta__wpdb__usermeta" />
</rule>


</ruleset>
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Changelog

All notable changes to this project will be documented in this file.

## Unreleased


40 changes: 28 additions & 12 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,24 @@
{
"name": "figuren-theater/install.php",
"description": "WordPress installer-dropin for the figuren.theater Multisite network.",
"homepage": "https://websites.fuer.figuren.theater",
"type": "wordpress-dropin",
"keywords": ["wordpress","wp","installer","dropin"],
"license": "GPL-3.0-or-later",
"type": "wordpress-dropin",
"keywords": [
"wordpress",
"wp",
"installer",
"dropin"
],
"authors": [
{
"name": "figuren.theater",
"email": "[email protected]"
"name": "figuren.theater",
"email": "[email protected]"
},
{
"name": "Carsten Bach",
"email": "[email protected]",
"homepage": "https://carsten-bach.de",
"role": "Developer"
"name": "Carsten Bach",
"email": "[email protected]",
"homepage": "https://carsten-bach.de",
"role": "Developer"
},
{
"name": "Onni Hakala",
Expand All @@ -23,13 +27,25 @@
"role": "Developer"
}
],
"homepage": "https://websites.fuer.figuren.theater",
"support": {
"email": "[email protected]",
"issues": "https://github.com/figuren-theater/install.php/issues",
"source": "https://github.com/figuren-theater/install.php"
"email": "[email protected]",
"issues": "https://github.com/figuren-theater/install.php/issues",
"source": "https://github.com/figuren-theater/install.php"
},
"require": {
"php": ">=7.0",
"koodimonni/composer-dropin-installer": ">=1.0.1"
},
"require-dev": {
"figuren-theater/code-quality": "^0.5.0"
},
"config": {
"allow-plugins": {
"koodimonni/composer-dropin-installer": true,
"phpstan/extension-installer": true,
"dealerdirect/phpcodesniffer-composer-installer": true,
"ergebnis/composer-normalize": true
}
}
}
Loading

0 comments on commit 8b61dfa

Please sign in to comment.