Skip to content

Commit

Permalink
Add basic repo files
Browse files Browse the repository at this point in the history
  • Loading branch information
aristath committed Sep 22, 2022
1 parent f77934d commit af0fa77
Show file tree
Hide file tree
Showing 4 changed files with 89 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# 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
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
indent_style = tab

[*.yml]
indent_style = space
indent_size = 2

[*.md]
trim_trailing_whitespace = false

[{*.txt,wp-config-sample.php}]
end_of_line = crlf
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
vendor/
composer.lock
25 changes: 25 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"name": "aristath/sqlite",
"license": "GPL-2.0-or-later",
"description": "SQLite integration plugin for WordPress.",
"homepage": "https://github.com/aristath/sqlite",
"keywords": [ "wordpress", "plugin", "database", "sqlite" ],
"support": {
"issues": "https://github.com/aristath/sqlite/issues"
},
"require": {
"php": ">=5.6"
},
"require-dev": {
"dealerdirect/phpcodesniffer-composer-installer": "^0.7.0",
"squizlabs/php_codesniffer": "3.6.0",
"wp-coding-standards/wpcs": "~2.3.0",
"phpcompatibility/phpcompatibility-wp": "~2.1.3",
"yoast/phpunit-polyfills": "^1.0.1"
},
"config": {
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true
}
}
}
38 changes: 38 additions & 0 deletions phpcs.xml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?xml version="1.0"?>
<ruleset name="WordPress Coding Standards">
<description>Apply WordPress Coding Standards</description>

<!-- Only scan PHP files. -->
<arg name="extensions" value="php"/>

<!-- Set the memory limit to 256M.
For most standard PHP configurations, this means the memory limit will temporarily be raised.
Ref: https://github.com/squizlabs/PHP_CodeSniffer/wiki/Advanced-Usage#specifying-phpini-settings
-->
<ini name="memory_limit" value="256M"/>

<!-- Strip the filepaths down to the relevant bit. -->
<arg name="basepath" value="./"/>

<!-- Check up to 20 files simultaneously. -->
<arg name="parallel" value="20"/>

<!-- Show sniff codes in all reports. -->
<arg value="ps"/>

<file>.</file>

<rule ref="WordPress-Core"/>
<rule ref="WordPress.CodeAnalysis.EmptyStatement"/>

<!-- Directories and third party library exclusions. -->
<exclude-pattern>/vendor/*</exclude-pattern>

<!-- Allow the WP DB Class and related tests for usage of direct database access functions. -->
<rule ref="WordPress.DB.RestrictedClasses.mysql__PDO">
<exclude-pattern>/wp-includes/*.php</exclude-pattern>
</rule>
<rule ref="WordPress.DB.RestrictedFunctions">
<exclude-pattern>/wp-includes/*.php</exclude-pattern>
</rule>
</ruleset>

0 comments on commit af0fa77

Please sign in to comment.