This repository has been archived by the owner on Jun 15, 2021. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add fews scripts and instructions to cleanup messy things. THX to milescellar and sijad!
- Loading branch information
Showing
6 changed files
with
132 additions
and
0 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,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 |
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,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 |
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,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 |
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,3 @@ | ||
preset: recommended | ||
|
||
risky: false |
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,12 @@ | ||
language: bash | ||
|
||
before_script: | ||
- go get github.com/sijad/yaml-translation-utils/yamllinter | ||
|
||
script: | ||
- bash scripts/linter.sh | ||
|
||
notifications: | ||
email: | ||
on_failure: change | ||
|
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 @@ | ||
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 | ||
|