Skip to content

Commit

Permalink
added coc, cleaned up configs
Browse files Browse the repository at this point in the history
  • Loading branch information
shrink0r committed Oct 21, 2016
1 parent 25b8591 commit 8e2683d
Show file tree
Hide file tree
Showing 7 changed files with 121 additions and 39 deletions.
6 changes: 0 additions & 6 deletions .codeclimate.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
engines:
scss-lint:
enabled: true
csslint:
enabled: true
duplication:
enabled: true
config:
languages:
- php
- javascript
fixme:
enabled: true
phpcodesniffer:
Expand All @@ -23,7 +18,6 @@ engines:

ratings:
paths:
- "**.css"
- "**.php"

exclude_paths:
Expand Down
10 changes: 9 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
root = true

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

[*.yml]
indent_size = 2

[*.md]
trim_trailing_whitespace = false
75 changes: 75 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,78 @@ If you want to contribute source code, add documentation or fix spelling mistake
1. Send a [pull request](http://help.github.com/pull-requests/) with a well written issue describing the change and why it is necessary.

Please note, that the code tries to adhere to the [PSR-2 Coding Style Guide](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md). Commits are continously integrated via [TravisCI](https://travis-ci.org/shrink0r/monatic) and failing the PHPUnit or PHP CodeSniffer tests will fail the builds. Usually the build status will be shown on your pull request by Github. If something fails please try to fix your changes as otherwise integrating them is harder.

# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, gender identity and expression, level of experience,
nationality, personal appearance, race, religion, or sexual identity and
orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment
include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at [INSERT EMAIL ADDRESS]. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at [http://contributor-covenant.org/version/1/4][version]

[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/
9 changes: 0 additions & 9 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,6 @@
"license": "MIT",
"description": "Fiddling with the monad concept in php",
"keywords": [ "monad" ],
"authors": [
{
"name": "Thorsten Schmitt-Rink",
"email": "[email protected]"
}
],
"require": {
"php": ">=5.6.0",
"symfony/property-access": "~3.1"
Expand Down Expand Up @@ -41,9 +35,6 @@
"/vendor"
]
},
"suggest": {
"ext-fileinfo": "to handle mimetype guessing locally"
},
"scripts": {
"test": [
"@php-lint",
Expand Down
2 changes: 1 addition & 1 deletion composer.lock

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

56 changes: 35 additions & 21 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,34 +1,48 @@
<?xml version="1.0" encoding="UTF-8"?>

<phpunit backupGlobals="false"
backupStaticAttributes="false"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
syntaxCheck="true"
<!-- http://www.phpunit.de/manual/current/en/appendixes.configuration.html -->
<phpunit
backupGlobals = "false"
backupStaticAttributes = "false"
colors = "true"
convertErrorsToExceptions = "true"
convertNoticesToExceptions = "true"
convertWarningsToExceptions = "true"
processIsolation = "false"
stopOnFailure = "false"
syntaxCheck = "true"
bootstrap = "vendor/autoload.php"
>
<testsuites>
<testsuite name="All Tests">
<testsuite name="Configr-Tests">
<directory>src/</directory>
<directory>tests/</directory>
</testsuite>
</testsuites>

<logging>
<log type="coverage-html" target="build/coverage" title="monatic - coverage" charset="UTF-8" yui="true" highlight="true" lowUpperBound="35" highLowerBound="70"/>
<log type="coverage-clover" target="build/logs/clover.xml"/>
<pmd>
<rule class="PHPUnit_Util_Log_PMD_Rule_Project_CRAP" threshold="5,30"/>
<rule class="PHPUnit_Util_Log_PMD_Rule_Class_DepthOfInheritanceTree" threshold="6"/>
<rule class="PHPUnit_Util_Log_PMD_Rule_Class_EfferentCoupling" threshold="20"/>
<rule class="PHPUnit_Util_Log_PMD_Rule_Class_ExcessiveClassLength" threshold="500"/>
<rule class="PHPUnit_Util_Log_PMD_Rule_Class_ExcessivePublicCount" threshold="20"/>
<rule class="PHPUnit_Util_Log_PMD_Rule_Class_TooManyFields" threshold="15"/>
<rule class="PHPUnit_Util_Log_PMD_Rule_Class_TooManyMethods" threshold="20"/>
<rule class="PHPUnit_Util_Log_PMD_Rule_Function_CodeCoverage" threshold="35,70"/>
<rule class="PHPUnit_Util_Log_PMD_Rule_Function_CRAP" threshold="30"/>
<rule class="PHPUnit_Util_Log_PMD_Rule_Function_CyclomaticComplexity" threshold="20"/>
<rule class="PHPUnit_Util_Log_PMD_Rule_Function_ExcessiveMethodLength" threshold="100"/>
<rule class="PHPUnit_Util_Log_PMD_Rule_Function_ExcessiveParameterList" threshold="10"/>
<rule class="PHPUnit_Util_Log_PMD_Rule_Function_NPathComplexity" threshold="200"/>
</pmd>
</logging>
<filter>
<whitelist>
<directory>src/</directory>
<directory suffix=".php">src</directory>
<directory suffix=".php">tests/</directory>
</whitelist>
</filter>

<logging>
<log type="coverage-clover" target="build/logs/clover.xml"/>
<log type="coverage-html" target="build/logs/coverage-html"
charset="UTF-8"
yui="true"
highlight="true"
lowUpperBound="60"
highLowerBound="80"/>
</logging>
</phpunit>
2 changes: 1 addition & 1 deletion sami.cfg.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
//$versions = GitVersionCollection::create(__DIR__)->add('master', 'master branch')->addFromTags('*');

return new Sami($iterator, [
'title' => 'YOURNAMESPACE API',
'title' => 'monatic - api doc',
'default_opened_level' => 2,
'build_dir' => __DIR__ . '/build/docs/sami/api/%version%',
'cache_dir' => __DIR__ . '/build/cache/sami/%version%',
Expand Down

0 comments on commit 8e2683d

Please sign in to comment.