1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-11-14 11:00:10 +01:00
Commit Graph

49 Commits

Author SHA1 Message Date
Hans-Christoph Steiner
a1a88d39cf download looseversion to vendor
e1a5a176a9/src/looseversion/__init__.py
2023-12-08 10:42:27 +01:00
proletarius101
4b898287e9 make linting and formatting rules consistent 2023-05-04 14:12:08 +00:00
Hans-Christoph Steiner
a692cd9d72 hooks/pre-commit: enable pydocstyle, if installed 2023-04-28 10:55:21 +02:00
Hans-Christoph Steiner
d7214a7f1c hooks/pre-commit: run yamllint on more YAML files
I keep messing up YAML syntax with values that have : in them...

This doesn't work for all YAML files:
* tests/metadata/dump/*.yaml have bad indenting
* tests/metadata/*.yml have bad indenting, which is useful for tests
2023-04-28 10:55:21 +02:00
linsui
33137a8516 ignore E203 for black 2021-06-24 12:15:01 +00:00
Hans-Christoph Steiner
cb09a16133
tests/ndk-release-checksums.py: fix parsing of NDK r10e
This wasn't finding r10e properly, so it would submit merge requests
to remove r10e from _fdroidserver_.

* !940
* !930
2021-06-07 09:58:12 +02:00
Hans-Christoph Steiner
669ce10d9a
enable complete lint/CI checking on gradle-release-checksums.py 2021-01-25 11:05:16 +01:00
Hans-Christoph Steiner
330ca2319c
example plugin for fetching srclibs
This is used in _fdroiddata_'s `fdroid build` CI job, and _issuebot_.
This uses @uniqx's awesome new 'plugin' feature to create a 'fetchsrclibs`
command.  The 'fdroid build' gitlab-ci job uses --on-server, which does not
set up the srclibs.  This plugin does the missing setup.

This is moved from _fdroiddata_ where it was _tools/fdroid_fetchsrclibs.py_.
2020-12-22 16:59:02 +01:00
Hans-Christoph Steiner
a9fdb5b401 init: switch to config.yml as the default format 2020-10-23 14:20:49 +02:00
Marcus Hoffmann
34b698aa45
hooks: add gradlew-fdroid to BASH_FILES 2018-07-11 11:49:41 +02:00
Hans-Christoph Steiner
8c4f75e05f pre-commit hook: use most compatible grep flags
The minimal test suite runs on Alpine use busybox grep, and BSD grep also
often has different flags.
2018-05-29 11:28:08 +02:00
Hans-Christoph Steiner
b851d49d24 shell=True is too dangerous to allow; there are unfiltered user inputs
There are all sorts of unfiltered user inputs like tag and branch names in
source repos.  If those names are fed into popen calls that use shell=True,
that opens up a wide range of exploits.  All core operations should never
use shell=True.
2018-01-26 10:18:41 +01:00
Hans-Christoph Steiner
6902160e89 remove fd-commit, no active devs use it, and requires Auto Name/Name
fd-commit and checkupdates both require that there are two name fields,
AutoName: and Name:.  This is only used for the commit messages.  Since the
current devs do it manually, we can remove the fd-commit shell script, then
focus on checkupdates when revamping AutoName/Name.

https://botbot.me/freenode/fdroid-dev/msg/82539152
2017-12-06 22:48:08 +01:00
Hans-Christoph Steiner
67e6cbe793 hooks/pre-commit: make ruby and dash tests optional
These are only used for checking syntax in buildserver/Vagrantfile.
Not requiring ruby makes doing CI tests on lots of distros easier
and faster. dash is an 'essential' package on Debian derivs, so
those tests will always be run somewhere.
2017-12-06 12:30:47 +01:00
relan
6498d24f36 tests: fix pycodestyle lookup
Pycodestyle is available as /usr/bin/pycodestyle-3 on Fedora.
2017-11-27 16:32:41 +03:00
Hans-Christoph Steiner
8cfc590b39 hooks: add new jenkins scripts to syntax checker 2017-11-08 12:40:18 +01:00
Hans-Christoph Steiner
8decd3b504 remove TeX manual, it moved to https://gitlab.com/fdroid/fdroid-website
The whole TeX manual has been folded into the new Jekyll-based website, so
this is no longer needed at all.
2017-02-24 14:01:31 +01:00
Hans-Christoph Steiner
14de399bb7 buildserver: remove Kivy, unused since 2013 and out of date
This is the last thing using Chef, which adds a lot of time to the time it
takes to fully provision the buildserver.  This slows down development on
the things we are actually using, like running all builds on
jenkins.debian.net.

#210 #165
2016-09-12 14:58:08 +02:00
Daniel Martí
b53e56916c pre-commit: pep8 is now pycodestyle
See https://github.com/PyCQA/pycodestyle/issues/466.
2016-07-13 14:42:23 +01:00
Daniel Martí
d8a8c24584 pre-commit: fix warnings and errors
Properly print warnings to stderr. Also, use : instead of 'echo' as a
fallback as the latter spits out garbage to stdout.

Examples without pep8 installed.

Before:

	 $ ./hooks/pre-commit
	./hooks/pre-commit: line 97: WARNING:: command not found
	ERROR: pep8 tests failed!

After:

	 $ ./hooks/pre-commit
	WARNING: pep8 is not installed, using dummy placeholder!
2016-07-13 12:15:22 +01:00
Hans-Christoph Steiner
d4c6fffb30 buildserver: buildserver/Vagrantfile is configed by .yaml file
Vagrantfile is now committed and not changed between configurations. It is
configed by translating the python config file's dict to a YAML file, which
Vagrantfile now loads and uses.  This makes it a lot easier for vagrant
users and python programmers to understand, and hopefully makes it easier
to maintain and test with.
2016-07-04 23:54:52 +02:00
Hans-Christoph Steiner
c11edc3022 include new provisioning shell scripts in syntax checks 2016-06-15 16:35:00 +02:00
Hans-Christoph Steiner
14b702b23b githooks: do not run syntax checks on files being deleted 2016-06-15 14:59:56 +02:00
Hans-Christoph Steiner
aa0ea46465 not all UNIX echo commands support -n
FreeBSD and OSX's does not, for example, and the shell should just treat
the '\n' as white space in the command line.
2016-03-14 12:49:38 +01:00
Daniel Martí
84568c15a6 Fix detection of pyflakes3 found in Debian 2016-03-11 13:27:01 +00:00
Daniel Martí
74197a9a2d pep8: start obeying E226
We nearly did already anyway.
2016-03-11 13:27:00 +00:00
Daniel Martí
72288345e3 pep8: Don't ignore rules we already obey 2016-03-11 13:27:00 +00:00
Daniel Martí
d42c612c9a pre-commit: port to python3 2016-03-10 16:43:37 +00:00
Hans-Christoph Steiner
c9394b1c99 pre-commit: make pyflakes optional to support older platforms
Travis-CI defaults to Ubuntu/precise, which has a very old version of
pyflakes that throws false positives.
2016-02-15 23:06:31 +01:00
Daniel Martí
437d06c51e pre-commit: fix multiple file issue
When using -z, you should always quote. If not, stuff like this happens:

	.git/hooks/pre-commit: line 10: [: too many arguments
2016-02-15 12:04:34 +00:00
Hans-Christoph Steiner
dfca237329 fix errors in pre-commit hook when run in test suite 2016-02-12 08:33:22 +01:00
Hans-Christoph Steiner
7c30569aed make git pre-commit hook only test files to be committed
Right now, the git pre-commit hook is pretty annoying to work with when
development since it tests every single file.  That means notes, incomplete
stuff, etc. will be run through the tests.  So all of the files need to be
clean in order to commit even a single trivial fix.  This commit changes it
so that the pre-commit hook is only run on the files staged to be committed.
2016-02-03 14:54:14 +01:00
Hans-Christoph Steiner
f87b17139b pep8: on *.TestCase, skip "E402 module level import not at top of file"
The tests use a little hack in order to cleanly import the fdroidserver
package locally like a regular package.  pep8 doesn't see that, so this
changes the pep8 to skip E402 on *.TestCase
2015-09-01 20:10:01 +02:00
Hans-Christoph Steiner
9e5dd19fc8 add test files to pre-commit hook and fix pep8 errors 2015-09-01 11:39:50 +02:00
Daniel Martí
8510961db9 Also ignore PEP8 W503 2015-03-05 15:24:52 +01:00
Daniel Martí
9be0d35bd1 Ignore all the pep8 errors ignored by the default config 2015-02-07 21:58:24 -08:00
Daniel Martí
3c9dd9bc86 Add bash-completion to pre-commit bash checks 2015-01-11 14:17:25 +01:00
Daniel Martí
e830b25561 pre-commit: differentiate sh and bash files 2015-01-09 16:08:27 +01:00
Daniel Martí
547661fd3a hooks/pre-commit: Fix message 2015-01-09 15:36:17 +01:00
Daniel Martí
5e15d8ff47 Add ruby tests to the pre-commit hook 2014-12-12 12:34:28 +01:00
Daniel Martí
c91fca7bb4 Properly catch return codes since -x is no longer used 2014-11-09 14:36:58 +01:00
Daniel Martí
d3faacf9b0 Don't accept pyflakes/pep8 not being installed, common err func 2014-11-09 14:34:24 +01:00
Daniel Martí
cf4635e655 List sh files to check like the python files 2014-11-09 14:31:50 +01:00
Daniel Martí
92a4bacbf6 git pre-commit hooks are always run from the root
No need to find out the basedir. We don't do it for the python tests anyway.
2014-11-09 14:29:28 +01:00
Hans-Christoph Steiner
e8a5d2b354 check the syntax of included shell scripts in the pre-commit hook 2014-10-23 14:26:11 -04:00
Daniel Martí
880f75110e Add setup.py to pep8+pyflakes hook, fix it 2014-08-16 11:51:23 +02:00
Daniel Martí
b891689bc5 Add config.buildserver.py to the pre-commit hook 2014-07-03 18:28:49 +02:00
Daniel Martí
c125ab9b7f Enable pep8 in pre-commit 2014-05-31 23:09:58 +02:00
Daniel Martí
709ead7db7 Add pre-commit hook with installer
Will enable pep8 once all the problems are gone
2014-05-28 09:28:28 +02:00