Hans-Christoph Steiner
fede58a710
use ArgumentParser's own "usage" line in help output
2020-10-01 23:01:55 +02:00
Hans-Christoph Steiner
b23cf9f8ad
use YAML names for referring to metadata fields in messages
2020-10-01 23:01:55 +02:00
Hans-Christoph Steiner
5e1377c77a
standardize on "Application ID" in UI text
2020-10-01 23:01:55 +02:00
Hans-Christoph Steiner
0b92e60266
handle file type detection using Pythonic methods
...
This ditches the custom common.get_extension() for straight core Python
methods. This should make the code closer to Python conventions. For
example, pathlib also includes the "." in the extension it returns.
2020-08-24 17:05:49 +02:00
Michael Pöhn
f5a5fffb10
purge accepted_formats from config
2020-08-20 20:40:15 +02:00
Hans-Christoph Steiner
62c8fd5999
add Liberapay: field with username as data
...
Liberapay was originally included using a numeric ID, since they had
not yet finalized the public URLs. Now it is a username. So this
logic prefers the username in Liberapay: field, and keeps the old
LiberapayID: to ease migration. LiberapayID: will not override
Liberapay:. Clients are expected to prefer Liberapay: over LiberapayID:
2020-06-16 15:35:28 +02:00
Hans-Christoph Steiner
b2daf96284
lint: fix pyflakes
2020-06-02 22:05:18 +02:00
Hans-Christoph Steiner
6c5887e906
lint: make --force-yamllint error if yamllint is not installed
...
https://gitlab.com/fdroid/fdroidserver/-/merge_requests/753#note_353829401
2020-06-02 21:56:05 +02:00
Hans-Christoph Steiner
410901d3bd
Merge branch 'yamllint' into 'master'
...
yamllint
See merge request fdroid/fdroidserver!721
2020-05-14 12:36:19 +00:00
Hans-Christoph Steiner
df563d339a
fix pep8 E741 ambiguous variable name 'l'
2020-05-14 12:11:36 +02:00
Michael Pöhn
810a6587df
add --force-yamllint option to lint
2020-04-25 17:39:23 +02:00
Michael Pöhn
b076e8cba7
add srclib spec parser
2020-04-25 17:22:48 +02:00
Michael Pöhn
ed2c5f6f5b
run yamllint on srclibs when running 'fdroid lint'
2020-04-25 15:57:21 +02:00
Michael Pöhn
4e69ff582f
run yamllint when parsing failed and also on fdroid lint runs
2020-04-24 15:47:31 +02:00
Hans-Christoph Steiner
a72904ee23
lint: allow Beerware and XSkat licenses
...
These licenses were already in our repo. The are not FSF- or OSI-approved,
but they are included in Debian. So for now at least, we should maintain
them in our list until we have a clearer picture of how we should make the
list of licenses we support.
* fdroidserver!682
* https://github.com/spdx/license-list-XML/issues/876
* Beerware in Debian:
https://metadata.ftp-master.debian.org/changelogs//main/libm/libmd/libmd_1.0.1-3_copyright
* XSkat in Debian:
https://metadata.ftp-master.debian.org/changelogs//main/x/xskat/xskat_4.0-7_copyright
2019-10-07 12:05:37 +02:00
Hans-Christoph Steiner
1ef4f74aff
lint: include MIT-CMU, it is so close to FSF/OSI-free MIT
...
fdroidserver!682
https://github.com/spdx/license-list-data/issues/53
* FSF lists two closely related variants as X11 or Expat, search for "MIT license" in https://www.gnu.org/licenses/license-list.html
* X11 is considered free: https://directory.fsf.org/wiki/License:X11
* Expat is considered free: https://directory.fsf.org/wiki/License:Expat
* It is included in Debian, so it is DFSG-free: https://metadata.ftp-master.debian.org/changelogs//main/f/flite/flite_2.1-release-3_copyright
* Fedora considers it free https://fedoraproject.org/wiki/Licensing:MIT#CMU_Style
2019-10-04 11:30:24 +02:00
Hans-Christoph Steiner
3801db064a
lint: improve HTTPS check
...
It was missing some domains, so I added another rule. @IzzySoft pointed
out it was redudnant, so this removes the redudant rule and fixes the
original.
https://gitlab.com/fdroid/fdroidserver/merge_requests/681/diffs#note_225263464
2019-10-04 11:12:48 +02:00
Hans-Christoph Steiner
af4e231f7d
lint: enforce HTTPS on GitHub and GitLab pages
...
The always provide HTTPS, so let's enforce it.
2019-10-04 11:12:48 +02:00
Hans-Christoph Steiner
17320c23f4
lint: don't trip up on projects with 'master' in the name
...
https://gitlab.com/fdroid/fdroiddata/merge_requests/5557#note_223283359
2019-10-04 11:12:48 +02:00
Michael Pöhn
d5ab303d83
lint: license override config option + require FSF/OSI approved licenses by default
2019-10-02 22:14:09 +02:00
Michael Pöhn
3c9535d64b
lint: fsf approved licenses only
2019-10-02 12:15:02 +02:00
Hans-Christoph Steiner
aa47e93f36
Revert "Revert "lint: check if CurrentVersion is older than oldest build entry""
...
This reverts commit a5ec1703c9 .
fdroid/fdroiddata@42bb872b46
2019-01-21 23:00:33 +01:00
Marcus Hoffmann
a5ec1703c9
Revert "lint: check if CurrentVersion is older than oldest build entry"
...
This reverts commit 78473e7dab .
This is currently blocked by some apps in fdroiddata being reset to a
broken state.
2019-01-10 14:48:52 +01:00
Marcus Hoffmann
e1c547cfdf
Revert "Revert "Merge branch 'random-fixes' into 'master'""
...
This reverts commit f6f2fb0b89 .
Only one of the included commit should have been reverted.
2019-01-10 14:48:29 +01:00
Marcus
f6f2fb0b89
Revert "Merge branch 'random-fixes' into 'master'"
...
This reverts merge request !605
2019-01-10 13:46:49 +00:00
Hans-Christoph Steiner
76b026e572
lint: check whether the locale was included in an f-droid.org URL
2019-01-03 21:00:01 +01:00
Hans-Christoph Steiner
78473e7dab
lint: check if CurrentVersion is older than oldest build entry
...
This causes F-Droid to never install this app, except for manually via the
Versions list in AppDetails.
2019-01-03 21:00:01 +01:00
Hans-Christoph Steiner
85993eb2f8
lint: check fields for proper type, e.g. list vs. string
...
fdroid/fdroidserver#578
2018-10-09 23:31:24 +02:00
Hans-Christoph Steiner
9d12b1dc61
add strict, tested validation of Android/F-Droid package names
...
Android has stricter rules than Java for Package Names, but anything the
Python regex thinks is valid must be valid according to Java's rules too.
https://developer.android.com/studio/build/application-id
2018-09-07 14:17:39 +02:00
Licaon_Kter
da0c541dec
Lint - the error should hint that the right word is Categories
2018-07-30 22:56:57 +00:00
Marcus Hoffmann
f4bb76f3a4
lint: update spdx tags to v4.0.0
2018-05-16 22:36:39 +02:00
Hans-Christoph Steiner
8f30c892c5
VercodeOperation: only allow simple math expresssions and %c
2018-03-05 09:45:58 +01:00
Marcus Hoffmann
c81d5da953
lint: fix update check data https check
...
The urlver field can be '.', this was not considered in
26bfd7fb28 .
2018-03-02 23:56:49 +01:00
Hans-Christoph Steiner
26bfd7fb28
lint: require UpdateCheckData to contain only valid HTTPS URLs
2018-03-01 23:51:27 +01:00
Hans-Christoph Steiner
1c9bc32bf6
lint: tighten up HTTPS checks on URLs
2018-03-01 23:38:56 +01:00
Hans-Christoph Steiner
498ea5d609
lint: ban all dangerous HTML tags
...
* https://en.wikipedia.org/wiki/HTML_sanitization
* https://asostack.com/enhance-your-google-play-store-description-with-rich-formatting-and-emojis-5f50ff354e5f
2018-02-27 12:09:54 +01:00
Hans-Christoph Steiner
5db86215f6
lint: check srclibs has name and @ in it
...
fdroiddata!2863
2018-01-31 13:33:36 +01:00
Hans-Christoph Steiner
53f603bf30
lint: check description for forbidden HTML tags: iframe, link, script, etc.
2018-01-26 10:18:41 +01:00
Andrea Scarpino
19a83b6219
Add Liberapay support
2017-12-12 11:53:31 +01:00
Hans-Christoph Steiner
b31239803a
lint: greatly expand the list of link shorteners to ban
...
Since we are now getting credit for fighting trackers, might as well step
up the fight!
gleaned from these sources:
* https://bit.do/list-of-url-shorteners.php
* https://www.hashtags.org/featured/list-of-url-shorteners/
* http://l-lists.com/en/lists/gvaoif.html
2017-12-06 09:54:25 +01:00
Hans-Christoph Steiner
05616b33a7
lint: enforce HTTPS and shortener ban in descriptions as well
2017-12-06 09:54:25 +01:00
Hans-Christoph Steiner
42a9833536
lint: switch links to plain URLS rather than mediawiki syntax
...
fdroidclient#1000
2017-12-06 09:54:25 +01:00
Hans-Christoph Steiner
8588b89eff
lint: add more VCS HTTPS checks
...
I manually checked that these work with HTTPS. fdroiddata!2710 should fix
all of these issues.
2017-12-06 09:54:25 +01:00
Hans-Christoph Steiner
6c7b987239
fix string formats that are ambiguous for translators
2017-09-16 13:19:38 +02:00
Hans-Christoph Steiner
fa0d618d2f
rename 'app-id' to standard Android 'applicationId'
...
* https://developer.android.com/studio/build/application-id.html
* https://sites.google.com/a/android.com/tools/tech-docs/new-build-system/applicationid-vs-packagename
This only changes the term in the human texts, not var names or CLI flags.
2017-09-15 11:41:51 +02:00
Hans-Christoph Steiner
278d67d960
implement gettext localization
...
This allows all the text to be localized via Weblate. This is a quick
overview of all the strings, but there are certainly some that were left
out.
closes #342
2017-09-15 11:39:00 +02:00
Hans-Christoph Steiner
cb10f0df09
standardize os.walk() var names based on Python 3.5 docs
...
There were multiple conventions used in the code, but mostly it was already
using the convention from the docs, so this converts things to using that
convention:
https://docs.python.org/3/library/os.html#os.walk
2017-09-15 11:37:21 +02:00
Michael Pöhn
20afa0e861
lint: check all build fields against accepted list
...
This makes sure there are no typoed or wrong build fields in all metadata
files.
2017-07-06 12:25:48 +02:00
Hans-Christoph Steiner
214c9f7a2b
lint: check file extension for metadata
...
This helps keep fdroiddata clean, on @krt's request.
closes #222
2017-06-28 23:14:57 +02:00
Hans-Christoph Steiner
18c3bfa5fb
lint can no longer properly detect unset Summary/Description
...
Since the Summary/Description can now be set in the app's source code, or
in fdroiddata/metadata/<packageName>/<locale>/*.txt, this lint check is
no longer valid. It is important to check whether these texts are empty,
but it'll require some thinking about how and where to best to that.
`fdroid update` will have access to all that data, but perhaps at that
point it is too late.
Also, the current text prioritization puts Summary/Description in the
.txt/.yml file at the highest priority, overriding every other copy,
including in fdroiddata/metadata/<packageName>/<locale> and in the app's
source code.
2017-06-07 22:10:25 +02:00