Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix clang-tidy warnings/errors #26

Open
springmeyer opened this issue Apr 5, 2018 · 0 comments
Open

Fix clang-tidy warnings/errors #26

springmeyer opened this issue Apr 5, 2018 · 0 comments

Comments

@springmeyer
Copy link
Contributor

Since enabling clang-tidy we now have travis job that runs it. To get this travis job passing we'll need to fix these warnings (probably minor, but let's see):

/home/travis/build/mapbox/spatial-algorithms/bench/scaling.cpp:2:1: error: #includes are not sorted properly [llvm-include-order,-warnings-as-errors]
#include <mapbox/geometry.hpp>
^
/home/travis/build/mapbox/spatial-algorithms/bench/scaling.cpp:6:1: error: do not use namespace using-directives; use using-declarations instead [google-build-using-namespace,-warnings-as-errors]
using namespace mapbox::geometry;
^
/home/travis/build/mapbox/spatial-algorithms/bench/scaling.cpp:15:30: error: rand() has limited randomness; use C++11 random library instead [cert-msc30-c,-warnings-as-errors]
        point<double> input{(rand() % 500) / 25.0, (rand() % 500) / 25.0};
                             ^
/home/travis/build/mapbox/spatial-algorithms/bench/scaling.cpp:15:53: error: rand() has limited randomness; use C++11 random library instead [cert-msc30-c,-warnings-as-errors]
        point<double> input{(rand() % 500) / 25.0, (rand() % 500) / 25.0};
                                                    ^

Lots more visible at https://travis-ci.org/mapbox/spatial-algorithms/jobs/339174781#L1021. To see them locally run:

make tidy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant