Merge branch 'use-yamllint' into 'master'

Use yamllint in GitLab CI

Closes fdroidserver#745

See merge request fdroid/fdroiddata!7742
This commit is contained in:
Hans-Christoph Steiner 2020-11-18 09:52:37 +00:00
commit 0a49cc4bd8
10 changed files with 41 additions and 10 deletions

View file

@ -7,7 +7,7 @@ lint:
- schedules
- pipelines
before_script:
- printf "Package\x3a androguard fdroidserver python3-asn1crypto python3-ruamel.yaml\nPin\x3a release a=stretch-backports\nPin-Priority\x3a 500\n" > /etc/apt/preferences.d/debian-stretch-backports.pref
- printf "Package\x3a androguard fdroidserver python3-asn1crypto python3-ruamel.yaml yamllint\nPin\x3a release a=stretch-backports\nPin-Priority\x3a 500\n" > /etc/apt/preferences.d/debian-stretch-backports.pref
- echo "deb http://deb.debian.org/debian/ stretch-backports main" > /etc/apt/sources.list.d/backports.list
- apt-get update
- apt-get -qy dist-upgrade
@ -33,7 +33,8 @@ lint:
fi;
done;
set -x;
apt-get install python3-colorama;
apt-get install python3-colorama yamllint;
for f in $files; do [[ $f == *'.yml' ]] && yamllint "$f"; done;
./tools/check-git-repo-availability.py $files;
./tools/audit-gradle.py $CHANGED;
set +x;

28
.yamllint Normal file
View file

@ -0,0 +1,28 @@
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: disable
hyphens:
level: warning
indentation:
level: warning
indent-sequences: consistent
line-length: disable
new-line-at-end-of-file:
level: warning
trailing-spaces:
level: warning
truthy: disable

View file

@ -1,2 +1,2 @@
RepoType: git
Repo: https://github.com/minetest/minetest_game.git
Repo: https://github.com/minetest/minetest_game.git

View file

@ -1,2 +1,2 @@
RepoType: hg
Repo: https://hg.mozilla.org/releases/mozilla-release/
Repo: https://hg.mozilla.org/releases/mozilla-release/

View file

@ -1,2 +1,2 @@
RepoType: hg
Repo: https://hg.mozilla.org/releases/mozilla-beta/
Repo: https://hg.mozilla.org/releases/mozilla-beta/

View file

@ -1,2 +1,3 @@
RepoType: git
Repo: https://github.com/mozilla/glean.git
Repo: https://github.com/mozilla/glean.git

View file

@ -1,5 +1,6 @@
RepoType: git-svn
#RepoType: git-svn
#Repo:https://cuckoochess.googlecode.com/svn/trunk/
#Subdir:DroidFish/jni/stockfish
RepoType: git
Repo: https://github.com/official-stockfish/Stockfish

View file

@ -3,4 +3,4 @@ Repo: https://github.com/realm/realm-js.git
Prepare: |
git submodule update --init
git submodule update --init

View file

@ -5,7 +5,7 @@ import os
import re
import sys
os.chdir(os.path.dirname(__file__) + '/../')
os.chdir(os.path.join(os.path.dirname(__file__), '..'))
count = 0

View file

@ -3,7 +3,7 @@
import glob
import os
os.chdir(os.path.dirname(__file__) + '/../')
os.chdir(os.path.join(os.path.dirname(__file__), '..'))
for f in glob.glob('metadata/*/*/*.txt') + glob.glob('metadata/*/*/*/*.txt'):
if os.path.getsize(f) == 0: