Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[TODO] Adding lints and automatic deployment system to TER
- Loading branch information
1 parent
be8b3b5
commit e521af3
Showing
11 changed files
with
302 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
# EditorConfig is awesome: http://EditorConfig.org | ||
|
||
# top-most EditorConfig file | ||
root = true | ||
|
||
# Unix-style newlines with a newline ending every file | ||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
# CSS-Files | ||
[*.css] | ||
indent_style = space | ||
indent_size = 4 | ||
|
||
# HTML-Files | ||
[*.html] | ||
indent_style = space | ||
indent_size = 4 | ||
|
||
# TMPL-Files | ||
[*.tmpl] | ||
indent_style = space | ||
indent_size = 4 | ||
|
||
# TSX-Files | ||
[*.tsx] | ||
indent_style = space | ||
indent_size = 4 | ||
|
||
# LESS-Files | ||
[*.less] | ||
indent_style = space | ||
indent_size = 4 | ||
|
||
# JS-Files | ||
[*.js] | ||
indent_style = space | ||
indent_size = 4 | ||
|
||
# PHP-Files | ||
[*.php] | ||
indent_style = space | ||
indent_size = 4 | ||
|
||
# MD-Files | ||
[*.md] | ||
indent_style = space | ||
indent_size = 4 | ||
|
||
# ReST-Files | ||
[*.rst] | ||
indent_style = space | ||
indent_size = 3 | ||
|
||
# TypoScript | ||
[*.typoscript,*.ts] | ||
indent_style = space | ||
indent_size = 4 | ||
|
||
# YML-Files | ||
[{*.yml,*.yaml}] | ||
indent_style = space | ||
indent_size = 2 | ||
|
||
# package.json, composer.json or .travis.yml | ||
[{package.json,composer.json,.travis.yml}] | ||
indent_style = space | ||
indent_size = 2 | ||
|
||
# SCSS | ||
[*.scss] | ||
indent_style = tab | ||
indent_size = 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
cache: | ||
key: "$CI_COMMIT_REF_NAME-$CI_JOB_STAGE" | ||
paths: | ||
- .composer/ | ||
|
||
before_script: | ||
- apk add git --update | ||
|
||
stages: | ||
- php | ||
- typoscript | ||
- yaml | ||
#- fluid | ||
#- xliff | ||
|
||
.php: &phptesting | ||
stage: php | ||
image: php:$DOCKER_TAG | ||
only: | ||
- branches | ||
before_script: | ||
- export TYPO3_PATH_WEB="$PWD/.Build/Web" | ||
- export COMPOSER_CACHE_DIR=.composer | ||
- curl -OLs https://composer.github.io/installer.sig | ||
- php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" | ||
- php -r "if (hash_file('SHA384', 'composer-setup.php') === trim(file_get_contents('installer.sig'))) { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" | ||
- php composer-setup.php --no-ansi --install-dir=/usr/bin --filename=composer | ||
- php -r "unlink('composer-setup.php'); unlink('installer.sig');" | ||
- composer require friendsofphp/php-cs-fixer | ||
script: | ||
- .Build/bin/php-cs-fixer fix --dry-run --config=.php_cs --diff | ||
|
||
# Tests in PHP 7.2 and TYPO3 9.5 version | ||
php:testphp72:typo3_95: | ||
<<: *phptesting | ||
variables: | ||
DOCKER_TAG: 7.2-alpine | ||
# TYPO3_VERSION: ^9.5 | ||
|
||
typoscript:test: | ||
image: composer:1.6 | ||
stage: typoscript | ||
before_script: | ||
- export COMPOSER_CACHE_DIR=.composer | ||
- composer require --dev helmich/typo3-typoscript-lint | ||
script: | ||
- .Build/bin/typoscript-lint -c tslint.yaml | ||
|
||
yaml:test: | ||
image: python:alpine3.7 | ||
stage: yaml | ||
before_script: | ||
- pip install yamllint==1.10.0 | ||
script: | ||
- yamllint -c .yamllint . | ||
|
||
#fluid:test: | ||
# image: composer:1.6 | ||
# stage: fluid | ||
# before_script: | ||
# - export COMPOSER_CACHE_DIR=.composer | ||
# - composer require typo3fluid/fluid-lint:dev-master | ||
# script: | ||
# - .Build/bin/fluidlint Resources/Private/Templates/Default.html | ||
|
||
#xliff:test: | ||
# image: composer:1.6 | ||
# stage: xliff | ||
# before_script: | ||
# - export COMPOSER_CACHE_DIR=.composer | ||
# #- apk --no-cache add libxml2-utils | ||
# #- wget https://raw.githubusercontent.com/symfony/translation/v4.1.1/Resources/schemas/xliff-core-1.0-strict.xsd | ||
# - composer require symfony/translation | ||
# script: | ||
# - .Build/bin/xlifflint /usr/local/bin/php lint:xliff /Resources/Private/Language | ||
# #- xmllint --schema xliff-core-1.0-strict.xsd --noout $(find Resources -name '*.xlf') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
<?php | ||
/** | ||
* This file represents the configuration for Code Sniffing PSR-2-related | ||
* automatic checks of coding guidelines | ||
* Install @fabpot's great php-cs-fixer tool via | ||
* | ||
* $ composer global require friendsofphp/php-cs-fixer | ||
* | ||
* And then simply run | ||
* | ||
* $ php-cs-fixer fix | ||
* | ||
* For more information read: | ||
* http://www.php-fig.org/psr/psr-2/ | ||
* http://cs.sensiolabs.org | ||
*/ | ||
if (PHP_SAPI !== 'cli') { | ||
die('This script supports command line usage only. Please check your command.'); | ||
} | ||
return PhpCsFixer\Config::create() | ||
->setRiskyAllowed(true) | ||
->setRules([ | ||
'@PSR2' => true, | ||
'general_phpdoc_annotation_remove' => [ | ||
'author' | ||
], | ||
'no_leading_import_slash' => true, | ||
'no_trailing_comma_in_singleline_array' => true, | ||
'no_singleline_whitespace_before_semicolons' => true, | ||
'no_unused_imports' => true, | ||
'concat_space' => ['spacing' => 'one'], | ||
'no_whitespace_in_blank_line' => true, | ||
'ordered_imports' => true, | ||
'single_quote' => true, | ||
'no_empty_statement' => true, | ||
'no_extra_consecutive_blank_lines' => true, | ||
'phpdoc_no_package' => true, | ||
'phpdoc_scalar' => true, | ||
'no_blank_lines_after_phpdoc' => true, | ||
'array_syntax' => ['syntax' => 'short'], | ||
'whitespace_after_comma_in_array' => true, | ||
'function_typehint_space' => true, | ||
'hash_to_slash_comment' => true, | ||
'no_alias_functions' => true, | ||
'lowercase_cast' => true, | ||
'no_leading_namespace_whitespace' => true, | ||
'native_function_casing' => true, | ||
'self_accessor' => true, | ||
'no_short_bool_cast' => true, | ||
'no_unneeded_control_parentheses' => true | ||
]) | ||
->setFinder( | ||
PhpCsFixer\Finder::create() | ||
->exclude('.build') | ||
->exclude('var') | ||
//->exclude('public') | ||
->in(__DIR__) | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
language: php | ||
|
||
php: | ||
- 7.2 | ||
|
||
#env: | ||
# - TYPO3_VERSON="9.5" | ||
|
||
sudo: false | ||
|
||
notifications: | ||
email: false | ||
|
||
addons: | ||
apt: | ||
packages: | ||
- parallel | ||
|
||
cache: | ||
directories: | ||
- $HOME/.composer/cache | ||
|
||
before_script: | ||
#- composer require typo3/minimal ${TYPO3_VERSON} --update-with-dependencies | ||
#- composer require nimut/testing-framework | ||
- composer require friendsofphp/php-cs-fixer | ||
- composer require --dev helmich/typo3-typoscript-lint | ||
- pip install yamllint==1.10.0 | ||
|
||
script: | ||
- .Build/bin/php-cs-fixer fix --dry-run --config=.php_cs --diff | ||
- .Build/bin/typoscript-lint -c tslint.yaml | ||
- yamllint -c .yamllint . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
--- | ||
|
||
extends: default | ||
|
||
rules: | ||
braces: | ||
level: warning | ||
max-spaces-inside: 1 | ||
brackets: | ||
level: warning | ||
max-spaces-inside: 1 | ||
colons: | ||
level: warning | ||
commas: | ||
level: warning | ||
comments: disable | ||
comments-indentation: disable | ||
document-start: disable | ||
empty-lines: | ||
level: warning | ||
hyphens: | ||
level: warning | ||
indentation: | ||
spaces: 2 | ||
level: warning | ||
indent-sequences: consistent | ||
line-length: disable | ||
line-length: | ||
max: 999 | ||
level: warning | ||
allow-non-breakable-inline-mappings: true | ||
truthy: disable | ||
|
||
ignore: | | ||
/.ddev/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
# [NITSAN] Guestbook | ||
https://extensions.typo3.org/extension/ns_guestbook/ | ||
# ns_guestbook | ||
|
||
- FREE version: You can download FREE version with basic-features at https://extensions.typo3.org/extension/ns_guestbook/ | ||
- PRO version: You can download PRO version with more-features & free-support at https://t3terminal.com/typo3-guestbook-plugin-free/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
paths: | ||
- Configuration | ||
|
||
filePatterns: | ||
- "*.ts" | ||
|
||
sniffs: | ||
- class: Indentation | ||
parameters: | ||
indentConditions: true | ||
- class: RepeatingRValue | ||
disabled: true | ||
- class: DeadCode | ||
disabled: true |
e521af3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.