Rosen Penev
cc6826fc3a
[clang-tidy] Remove redundant init
...
Found with modernize-use-default-member-init
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-12-05 15:03:43 -05:00
Rosen Penev
54e40008c9
[clang-tidy] Convert 0/1 to false/true
...
Found with modernize-use-bool-literals
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-12-05 15:03:43 -05:00
Rosen Penev
0344856d65
[clang-tidy] Switch C headers to C++ ones
...
Found using modernize-return-braced-init-list
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-12-05 15:03:43 -05:00
Rosen Penev
e46039efb1
[clang-tidy] Pass by value with std::move
...
Found with modernize-pass-by-value
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-12-05 15:03:43 -05:00
Rosen Penev
6cd15235be
[clang-tidy] Access static member through qualified-id
...
Found readability-static-accessed-through-instance
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-12-05 15:03:43 -05:00
Rosen Penev
37b641259c
[clang-tidy] Add const references where useful
...
Found with performance-for-range-copy
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-12-05 15:03:43 -05:00
Rosen Penev
defd49b13d
[clang-tidy] Add const where it makes sense
...
Found with readability-redundant-string-init
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-12-05 15:03:43 -05:00
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
Leo
643166a337
Uncoditionally include errno.h instead of guessing
...
POSIX tells us that it is errno.h, musl fails to build with -Werror
because it redirects sys/errno.h->errno.h and uses #warning
(cherry picked from commit 041248e7cc
)
2020-11-30 00:53:20 -05:00
John Nguyen
4c714e10a3
Fix typo in man page
...
The example for _unique has typo, should be using attribute for project.
Fixes #2277
(cherry picked from commit cf45f28cc0
)
2020-11-30 00:53:20 -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
b6910b9428
Add missing "QUARTER" to feedback_reserved_tags
...
A while ago I noticed that 630a1530e0
only
added the QUARTER virtual tag to src/Task.cpp, and when I checked that
again today, it was still missing from src/feedback.cpp, so I'm fixing
that.
2020-11-24 18:46:53 -05:00
mrossinek
4f14b8923f
Fix variant_subtract test case after PR #2095
2020-11-24 08:12:39 -05:00
Tomas Babej
1417be626f
TW-1511: Interpret string subtraction as concanetation with a dash
...
Fixes #1537 (previously known as TW-1511).
2020-11-24 08:12:39 -05:00
Max Rossmannek
cad9a4f834
Update diag.t to correct C++ version
...
The default C++ version was updated in 4729876
and this commit reflects
this change in the test.
2020-11-24 08:12:39 -05:00
mrossinek
ca1e2a5a6b
Mark project.t 1455 as expected failure
2020-11-24 08:12:39 -05:00
Tomas Babej
79e076c3c0
tests: Use updated unittest method
2020-11-24 08:12:39 -05:00
mrossinek
7d567c3ac9
Fix wait.t to correct expected output
2020-11-24 08:12:39 -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
351965a87b
Update copyright to 2020
2020-11-21 12:43:40 -05:00
Tomas Babej
d1b867f7b5
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:41:18 -05:00
Tomas Babej
52c49169b4
tests: Use updated unittest methods
2020-11-21 12:39:03 -05:00
Tomas Babej
720c561b75
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:38:14 -05:00
Leo
041248e7cc
Uncoditionally include errno.h instead of guessing
...
POSIX tells us that it is errno.h, musl fails to build with -Werror
because it redirects sys/errno.h->errno.h and uses #warning
2020-11-21 12:27:29 -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
3855ba9136
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:59:35 -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
Paul Beckingham
4729876714
Updated build to use C++17 by default
2020-11-20 17:47:13 -05:00