-
-
Notifications
You must be signed in to change notification settings - Fork 187
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
Clang tidy auto refactor (braces, nullptr, and using) #1338
Conversation
I dont understand this error.
This was never an issue before. Do we need to set something up on the fork or is Github acting up? |
I think we need to add the jenkinsbot user as a contributor to the bstat fork. I checked the 'allow edits from maintainers' thing was on but github must be goofing it for some reason |
I gave stan-buidlbot write access but that invite needs to be confirmed. But yeah the maintainers thing should suffice. Weird. |
@serban-nicusor-toptal we just sent the stan buildbot an email for permissions so it can make pushes to branches on the bstatcomp fork, I think that would fix the error below?
|
@SteveBronder Hey, I don't have access to that email :( |
I think doing this for the PR should solve it: https://help.github.com/en/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork Just a NB for all devs: the hope is that you all have clang-format and the githook ( |
Summary
Running clang-tidy with the checks below. This refactor is only aesthetic and does not change how any of the code is executed.
readability-braces-around-statements:
modernize-use-using:
everywhere clang-tidy can replace a
typedef
with ausing
it will akatypedef double A;
becomesusing A = double;
modernize-use-nullptr:
using
nullptr
instead of NULLThe original PR also had a cleanup to return a braced init list but after looking at the I didn't like it
Tests
refactor is only aesthetic so no new tests
Checklist
Math issue Update internals to use more modern c++ #1308
Copyright holder: Steve Bronder
The copyright holder is typically you or your assignee, such as a university or company. By submitting this pull request, the copyright holder is agreeing to the license the submitted work under the following licenses:
- Code: BSD 3-clause (https://opensource.org/licenses/BSD-3-Clause)
- Documentation: CC-BY 4.0 (https://creativecommons.org/licenses/by/4.0/)
the basic tests are passing
./runTests.py test/unit
)make test-headers
)make doxygen
)make cpplint
)the code is written in idiomatic C++ and changes are documented in the doxygen
the new changes are tested