- Apr 16, 2020
-
-
Brad King authored
This test fails very frequently on CI because it relies on the timing of process scheduling by the OS, which is not deterministic. Disable it.
-
- Apr 15, 2020
-
-
de210648 clang-tidy: address `readability-else-after-return` lint 535633fa clang-tidy: address `readability-isolate-declaration` lint 83b20b65 clang-tidy: address `readability-braces-around-statements` lint Acked-by:
Kitware Robot <kwrobot@kitware.com> Merge-request: !180
-
- Apr 13, 2020
-
-
Ben Boeckel authored
-
Ben Boeckel authored
-
Ben Boeckel authored
-
- Apr 10, 2020
-
-
986519af SystemTools: handle splitting a string starting with the separator 09942f51 testSystemTools: add tests for SplitString Acked-by:
Kitware Robot <kwrobot@kitware.com> Merge-request: !178
-
- Apr 09, 2020
-
-
If a string started with the separator, the first component would have the separator included in it.
-
-
ebb48d58 clang-tidy: address google-readability-casting lint 13b45a41 clang-tidy: address readability-else-after-return lints 87b57076 clang-tidy: address readability-braces-around-statements lints ccab3808 clang-tidy: address readability-isolate-declaration lints Acked-by:
Kitware Robot <kwrobot@kitware.com> Merge-request: !177
-
-
-
-
-
41700ca4 SystemTools: Fix FileIsExecutable on Windows Acked-by:
Kitware Robot <kwrobot@kitware.com> Merge-request: !179
-
Brad King authored
Since commit 66724af8 (SystemTools: Teach FindProgram to find non-readable programs, 2020-04-04), `FindProgram` uses the new `FileIsExecutable` method. On Windows this changed the check from `GetFileAttributesW` to `_waccess`, but the latter returns success even for Windows Store stubs like %USERPROFILE%\AppData\Local\Microsoft\WindowsApps\python.exe Since the goal of the original change was to fix executable permissions checks on UNIX-like platforms, simply restore the old check code on Windows.
-
- Apr 07, 2020
-
-
66724af8 SystemTools: Teach FindProgram to find non-readable programs Acked-by:
Kitware Robot <kwrobot@kitware.com> Merge-request: !175
-
- Apr 06, 2020
-
-
e3989b18 SystemTools: Restore GetCurrentWorkingDirectory slash conversion on Windows Acked-by:
Kitware Robot <kwrobot@kitware.com> Merge-request: !176
-
This commit fixes FindProgram failing to detect executable without read bit set. find_program internally uses SystemTools::FileExists which calls access(R_OK) instead of access(X_OK). Replacing SystemTools::FileExists with SystemTools::TestFileAccess fixes this issue. Fine example of such program is sudo.
-
c35a377f SystemTools: Refactor CollapseFullPath to call getcwd only when needed 019afb6e SystemTools: Drop GetCurrentWorkingDirectory 'collapse' argument 313b2f7a SystemTools: Make SystemToolsStatic singleton private to implementation file Acked-by:
Kitware Robot <kwrobot@kitware.com> Merge-request: !174
-
- Apr 04, 2020
-
-
Brad King authored
Many calls to the one-argument `CollapseFullPath` variant already have an absolute path and just need to collapse it. Avoid calling `getcwd` if the result is not needed because it can be an expensive syscall.
-
Brad King authored
The result of `getcwd` is always an absolute canonical path and does not need to be collapsed.
-
Brad King authored
-
- Apr 01, 2020
-
-
4b537c59 Tests: Handle that root users on linux can always write to files Acked-by:
Kitware Robot <kwrobot@kitware.com> Merge-request: !173
-
- Mar 31, 2020
-
-
It is common when running software from a container setup such as docker that the user is root. Because of this, some permission checks are pointless as the root user ( uid=0 ) can always do things such as write to files.
-
- Mar 25, 2020
-
-
0085096e avoid std::string::find() to check for prefix e3c051e2 SystemTools: create directories with the right permissions on Un*x bc9a4256 avoid inefficient usage of std::string::substr() 420c3b04 call std::string::clear() instead of assigning "" 8b1a29e1 optimize SystemToolsParseRegistryKey() Acked-by:
Kitware Robot <kwrobot@kitware.com> Merge-request: !172
-
- Mar 24, 2020
-
-
Rolf Eike Beer authored
Use compare() instead which will terminate faster if things don't match.
-
Rolf Eike Beer authored
-
Rolf Eike Beer authored
Avoid several memory allocations.
-
Rolf Eike Beer authored
-
Rolf Eike Beer authored
-
- Mar 20, 2020
-
-
25b61c12 Directory: make it move constructible and assignable Acked-by:
Kitware Robot <kwrobot@kitware.com> Merge-request: !171
-
- Mar 18, 2020
-
-
Rolf Eike Beer authored
-
- Mar 04, 2020
-
-
6621b069 STYLE: Use range-based loops from C++11 cc8fc323 STYLE: Use auto for variable type matches the type of the initializer 91429382 PERF: emplace_back method results in potentially more efficient code 6d20e7c9 STYLE: Prefer = default to explicitly trivial implementations d07092a0 STYLE: Use default member initialization 4c7f64eb COMP: Prefer const member functions acc916ed COMP: Prefer const pointer when value does not change 7be4043f STYLE: Prefer c++11 'using' to 'typedef' ... Acked-by:
Kitware Robot <kwrobot@kitware.com> Merge-request: !169
-
- Mar 03, 2020
-
-
Hans Johnson authored
C++11 Range based for loops can be used in Used as a more readable equivalent to the traditional for loop operating over a range of values, such as all elements in a container, in the forward direction.. Range based loopes are more explicit for only computing the end location once for containers.
-
Hans Johnson authored
This check is responsible for using the auto type specifier for variable declarations to improve code readability and maintainability. The auto type specifier will only be introduced in situations where the variable type matches the type of the initializer expression. In other words auto should deduce the same type that was originally spelled in the source
-
Hans Johnson authored
The check flags insertions to an STL-style container done by calling the push_back method with an explicitly-constructed temporary of the container element type. In this case, the corresponding emplace_back method results in less verbose and potentially more efficient code.
-
Hans Johnson authored
This check replaces default bodies of special member functions with = default;. The explicitly defaulted function declarations enable more opportunities in optimization, because the compiler might treat explicitly defaulted functions as trivial. Additionally, the C++11 use of = default more clearly expreses the intent for the special member functions.
-
Hans Johnson authored
Converts a default constructor’s member initializers into the new default member initializers in C++11. Other member initializers that match the default member initializer are removed. This can reduce repeated code or allow use of ‘= default’.
-
Hans Johnson authored
Finds non-static member functions that can be made const because the functions don’t use this in a non-const way. This check tries to annotate methods according to logical constness (not physical constness). Therefore, it will suggest to add a const qualifier to a non-const method only if this method does something that is already possible though the public interface on a const pointer to the object: reading a public member variable calling a public const-qualified member function returning const-qualified this passing const-qualified this as a parameter. This check will also suggest to add a const qualifier to a non-const method if this method uses private data and functions in a limited number of ways where logical constness and physical constness coincide: - reading a member variable of builtin type Specifically, this check will not suggest to add a const to a non-const method if the method reads a private member variable of pointer type because that allows to modify the pointee which might not preserve logical constness. For the same reason, it does not allow to call private member functions or member functions on private member variables. In addition, this check ignores functions that - are declared virtual - contain a const_cast - are templated or part of a class template - have an empty body - do not (implicitly) use this at all (see readability-convert-member-functions-to-static).
-