Skip to content
This repository has been archived by the owner on Jun 15, 2021. It is now read-only.

Commit

Permalink
cleanup code and commit
Browse files Browse the repository at this point in the history
Add fews scripts and instructions to cleanup messy things. THX to milescellar and sijad!
  • Loading branch information
Hiobi committed May 15, 2019
1 parent 228670b commit 2e253f1
Show file tree
Hide file tree
Showing 6 changed files with 132 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .editorconfig
@@ -0,0 +1,15 @@
root = true

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

[*.{json,php}]
indent_size = 4

[*.md]
trim_trailing_whitespace = false
28 changes: 28 additions & 0 deletions .gitattributes
@@ -0,0 +1,28 @@
# Defining attributes per path
# https://git-scm.com/docs/gitattributes

# Automatically normalize line endings for all text-based files
* text=auto

# This attribute sets a specific line-ending style to be used in the working directory
.* text eol=lf
*.js text eol=lf
*.json text eol=lf
*.md text eol=lf
*.php text eol=lf
*.sh text eol=lf
*.svg text eol=lf
*.yml text eol=lf

# Files and directories with this attribute won't be added to archive files
.editorconfig export-ignore
.gitattributes export-ignore
.gitignore export-ignore
.styleci.yml export-ignore
.travis.yml export-ignore
/.github export-ignore
CHANGELOG.md export-ignore
CODE_OF_CONDUCT.md export-ignore
CONTRIBUTING.md export-ignore
README.md export-ignore
/scripts export-ignore
41 changes: 41 additions & 0 deletions .gitignore
@@ -0,0 +1,41 @@
# Specifies intentionally untracked files to ignore
# https://git-scm.com/docs/gitignore

# Composer files
/vendor
composer.phar

# Linux files
.directory
.fuse_hidden*
.nfs*
.Trash-*
*~

# macOS files
._*
.apdisk
.AppleDB
.AppleDesktop
.AppleDouble
.com.apple.timemachine.donotpresent
.DocumentRevisions-V100
.DS_Store
.fseventsd
.LSOverride
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
Icon
Network Trash Folder
Temporary Items

# Windows files
[Dd]esktop.ini
*.lnk
*.stackdump
$RECYCLE.BIN/
ehthumbs_vista.db
ehthumbs.db
Thumbs.db
3 changes: 3 additions & 0 deletions .styleci.yml
@@ -0,0 +1,3 @@
preset: recommended

risky: false
12 changes: 12 additions & 0 deletions .travis.yml
@@ -0,0 +1,12 @@
language: bash

before_script:
- go get github.com/sijad/yaml-translation-utils/yamllinter

script:
- bash scripts/linter.sh

notifications:
email:
on_failure: change

33 changes: 33 additions & 0 deletions scripts/linter.sh
@@ -0,0 +1,33 @@
if ! [ -x "$(command -v yamllinter)" ]; then
echo 'Error: yamllinter is not installed.' >&2
exit 1
fi

GREEN='\033[0;32m'
RED='\033[0;31m'
NC='\033[0m'

cd "./locale"

RC=0

for r in *.yml
do
[ "$r" != "validation.yml" ] || continue

echo "Checking $r:"

yamllinter --file "$r" --level 2

if [ $? -eq 1 ]; then
RC=1
printf "${RED}⨉ failed${NC}\n"
else
printf "${GREEN}✓ passed${NC}\n"
fi

echo
done

exit $RC

0 comments on commit 2e253f1

Please sign in to comment.