Commit graph

9057 commits

Author SHA1 Message Date
Rosen Penev
bf40ea8816 [clang-tidy] Use default to initialize constructors
Found with modernize-use-equals-default

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-12-05 15:03:43 -05:00
Rosen Penev
897759e4dc [clang-tidy] Replace push_back with emplace_back
Found with modernize-use-emplace

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-12-05 15:03:43 -05:00
Rosen Penev
a468537c1b [clang-tidy] Use new range based loops
Found with modernize-loop-convert

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-12-05 15:03:43 -05:00
Rosen Penev
6ce2a129dd [clang-tidy] Use auto where the type is known
Found with modernize-use-auto

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-12-05 15:03:43 -05:00
Rosen Penev
a331cceded [clang-tidy] Use .empty instead of comparing size
Found with readability-container-size-empty

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-12-05 15:03:43 -05:00
Tomas Babej
d43fa66489 CmdPurge: Detect the failure mode of trying to purge non-deleted tasks
Prompted by the failure mode described by Glen Solsberry in #2254.
2020-12-05 14:31:27 -05:00
Julien Rabinow
e37d932208 bump libshared submodule version 2020-12-05 14:30:58 -05:00
Tomas Babej
ab12e3fafd
CMake: Add custom review target
Use with Github PR ids as follows:
make PR=2358 review
2020-12-04 00:20:30 -05:00
Tomas Babej
522ef20a85
scripts: Add a dockerfile to build review images
This automates the review process of a given PR by checking out the
current HEAD of the given PR and installing TW in a container.
2020-12-04 00:20:29 -05:00
Max Rossmannek
3d850715f4 Make virtual tags consistent across commands.
- the DUETODAY tag was deprecated in b2d49f397
- the QUARTER tag was added in 630a1530e and 4711dd9e1
- the PROJECT, PRIORITY and LATEST tags were added in 4008a64

Note: the documentation in the man page is already up-to-date.

Fixes #2359
2020-12-03 01:45:07 -05:00
Max Rossmannek
4663ca840f Mark failing tests as expected failures
Related issues:
- TW-1630 (#1654) needs to be re-opened!
- TW-1915 (#1928)
2020-11-30 01:01:26 -05:00
Max Rossmannek
d85901e7ff Properly escape filters including spaces
This adds a note to the man page to properly escape filters containing
spaces. It also fixes the unittests to reflect this.

One of the unittests contained an alternative syntax as discussed in
TW-1479 (#1505). It has been extracted into its own unittest and marked
as an expected failure because it is currently not supported.
2020-11-30 01:01:26 -05:00
Max Rossmannek
09e2cb46d6 Simplify task construction 2020-11-30 01:01:26 -05:00
Max Rossmannek
44bcd58051 Fix Undo command
The Undo command broke in 48dff11 when the `onModify` hook got added to
its execution in order to fix #2213. The reason for it begin broke is
that a Task object is created in an unsafe manner because the `prior`
task may be empty.
Catching this case fixes the bug.
2020-11-30 01:01:26 -05:00
Max Rossmannek
50cfd92ad5 Fix Arch docker image 2020-11-30 00:51:54 -05:00
Max Rossmannek
596d681be7 Fix faketime packages 2020-11-30 00:51:54 -05:00
Max Rossmannek
07a27cbd3b Replace libfaketime with faketime in debianstable
I verified locally that this avoids skipping all of the
faketime-dependent unittests. The Travis CI logs will have to be
investigated for all of the other docker images on which distros we may
need to apply a similar fix.
2020-11-30 00:51:54 -05:00
Max Rossmannek
61a78d0a6f Attempt greedy docker config update
This is an attempt at updating all docker configurations by simply
replacing the `python` packages with `python3`. The Travis CI will let
us know if this works.
2020-11-30 00:51:54 -05:00
Max Rossmannek
8b91cd97a8 Enforce Python 3 in test_hooks/wrapper
This change was not included in the previous commit because the sed
command I used included the `/usr/bin/env` path to ensure I don't
replace any occurences of the word `python` which I did not wish to
replace.
2020-11-30 00:51:54 -05:00
Max Rossmannek
f35989be0e Enforce Python 3 for unittests
This commit updates all tests to enforce the Python3 executable. This is
necessary because the `assertRegex` function we use was renamed to this
name only in Python 3.2 [1]

For reference:
s;/usr/bin/env python;/usr/bin/env python3;g

[1]: https://docs.python.org/3/library/unittest.html#unittest.TestCase.assertRegex
2020-11-30 00:51:54 -05:00
Tomas Janousek
2c4d4ad649 Test: Add UUID test demonstrating a "Cannot subtract strings" bug
$ task 0000000d-000a-0000-0000-000000000000 export
Cannot subtract strings
$ task 0000000d-0000-0000-0000-000000000000 export
The expression could not be evaluated.
2020-11-24 02:42:32 -05:00
Tomas Babej
a09f9d48ab Update copyright to 2020 2020-11-21 12:27:05 -05:00
Tomas Babej
d81b999fa9 tests: Do not require line buffering
Test runner complains about it not being supported with binary files and
it does not look like it affects any tests in the first place anyway.
2020-11-21 12:27:05 -05:00
Tomas Babej
02db131fa1 tests: Use updated unittest method 2020-11-21 12:27:05 -05:00
Tomas Babej
407d66d681 tests: Use updated Thread object API
Replace isAlive with is_alive as the former is no longer supported in
Python 3.9.
2020-11-21 12:27:05 -05:00
HTunne
75c0e41fcc Make modify and delete commands respect rc.recurrence.confirmation config option. 2020-11-21 12:26:41 -05:00
Tomas Babej
c47c7536f5
travis: Disable testing on gentoo
We would love to test on gentoo, but this currently breaks CI. Open to
community contributions to improve our coverage of this distrubition.
2020-11-21 00:27:36 -05:00
Michał Mirosław
7b2e68d176 Fix parsing of "PnM" recurrence periods
Due to not accounting for the leading "P", getNextRecurrence would always return the same datetime, breaking all generic "PnM" periods and leading to an infinite loop in generateDueDates.
2020-11-17 10:52:47 -05:00
Tin Lai
e0f24c0b19 speed up fish autocompletion and more features in completion options 2020-11-17 10:51:40 -05:00
Tom Dörr
07856c2d33 Update LICENSE
By changing the first line to `The MIT License`, users can see the license on the Github Taskwarrior main page.
2020-11-17 10:49:58 -05:00
Martin Michlmayr
174507e7ad Fix typos 2020-11-17 10:41:13 -05:00
javabird25
81183ae7d1 Fix SIGSEGV when substituting sequence with shorter one 2020-11-17 10:40:38 -05:00
Yoichi Hirai
ab443a8ecf Fix one test about backslash
The test was failing because it expected "Created task 1"
but it saw "Created task 0a436fd8-7f06-4168-a66d-bbc940498af9".

Instead, the new code looks at the description of task 1.
2020-11-17 10:39:37 -05:00
Tomas Babej
6727d08da0
Context: Do not set new-uuid by default
This reverts part of f6b2a6541c, which
(likely accidentally) re-introduced the new-uuid verbosity setting as a
default.
2020-09-18 21:33:54 -04:00
Tomas Babej
b1c95ec1d2
docs: Document changes to new-uuid behaviour
The behaviour of new-uuid was altered in
4e80d5d5fd but not documented.
2020-09-18 21:26:37 -04:00
Tomas Babej
6bfb275dcc
CmdAdd: Make sure a UUID is printed if ID does not exist
This fixes a regression was introduced in
4e80d5d5fd.

Currently, if a user (with default configuration) adds a completed or
deleted task, they do not get a confirmation message ("Created task
..."). This is due to the fact that:
a) new-uuid is not set by default
b) new-id is set by default, but only prints message if the added task
   is in pending or waiting state

Make sure to print a message containing UUID reference if the newly
added task is in completed or deleted state.
2020-09-18 21:10:59 -04:00
Matthew Martin
4b67f10cb1 Install zsh completer to site-functions 2020-03-12 10:43:34 -04:00
Jochen Sprickerhof
48dff115c2 hook onModify into task undo (Closes: #2213) 2020-03-12 10:42:52 -04:00
Marc Cornellà
dcdf7127e0 Correctly parse projects with spaces in zsh completion
This is the same as how the `_task_zshids` array is created.
See https://github.com/robbyrussell/oh-my-zsh/issues/8249
2020-03-12 10:39:24 -04:00
timbuntu
938e9130d6 Fixed report colors in calendar 2020-03-12 10:38:03 -04:00
Vladimir Rusinov
abddb1ea8e Fix add.t Test1549 test failure.
The test was failing on my machine on fresh checkout. It failed because
somehow both new-id and new-uuid verbosity were set during the test, so
TW defaulted to printing out uuid, which did not match the assertion.

Test fixed by explicitly setting verbosity to new-id.
2020-03-12 10:37:14 -04:00
Anthony VB
cad8bec8b6 Fix a typo. 2019-07-20 14:24:16 -04:00
Anthony VB
352161d3a8 Proofreading to give default values.
Per the beginning of the man page, the summary line should give the default value. This isn't the case in a few places, so I changed them. (No guarantees I found them all.)
2019-07-20 14:24:16 -04:00
Paul Beckingham
3bdc28fdb3 Added Anthony VB to AUTHORS 2019-07-20 14:21:18 -04:00
Anthony VB
0ec12860c1 Reorganise calendar section. 2019-07-20 14:18:54 -04:00
Paul Beckingham
4bbde50d9f Docs: Added Florian 2019-04-28 14:57:48 -04:00
Florian Heiderich
3ec8ace7d1 fix typo ("tests" -> "test") 2019-04-28 14:40:42 -04:00
Chad Phillips
8ebf79e1df fix stale reference to empty priority color config
color.pri.none is now color.uda.priority.none
2019-04-28 14:19:54 -04:00
Paul Beckingham
d01000e255 Updated AUTHOR and Changelog 2019-04-14 19:40:55 -04:00
Paul Beckingham
66f013ac13 - Thanks to Chad Phillips 2019-04-14 19:38:01 -04:00