Skip to content

Commit

Permalink
Update cpplint version (#338)
Browse files Browse the repository at this point in the history
This PR updates our pre-commit to use the latest version of cpplint. This brings in [my fix](cpplint/cpplint#269) that ensures that the pre-commit hook actually works in all environments. Without that fix, depending on the version of Python and setuptools in the base environment the cpplint installation may fail.

Authors:
  - Vyas Ramasubramani (https://github.com/vyasr)
  - Peter Andreas Entschev (https://github.com/pentschev)

Approvers:
  - Peter Andreas Entschev (https://github.com/pentschev)
  - Kyle Edwards (https://github.com/KyleFromNVIDIA)

URL: #338
  • Loading branch information
vyasr authored Dec 2, 2024
1 parent 16eaa57 commit 96be91f
Show file tree
Hide file tree
Showing 18 changed files with 25 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ repos:
types_or: [file]
args: ['-fallback-style=none', '-style=file', '-i']
- repo: https://github.com/cpplint/cpplint
rev: 1.6.1
rev: 2.0.0
hooks:
- id: cpplint
name: cpplint
Expand Down
1 change: 1 addition & 0 deletions cpp/python/src/exception.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
* SPDX-FileCopyrightText: Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES.
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <cstdio>
#include <ios>
#include <stdexcept>

Expand Down
1 change: 1 addition & 0 deletions cpp/python/src/worker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include <memory>
#include <mutex>
#include <sstream>
#include <utility>

#include <Python.h>

Expand Down
1 change: 1 addition & 0 deletions cpp/src/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
* SPDX-FileCopyrightText: Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES.
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <cstdio>
#include <sstream>
#include <string>

Expand Down
2 changes: 2 additions & 0 deletions cpp/src/context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@
* SPDX-FileCopyrightText: Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES.
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <cstdio>
#include <cstring>
#include <iostream>
#include <memory>
#include <string>
#include <vector>

#include <ucxx/context.h>
#include <ucxx/log.h>
Expand Down
1 change: 1 addition & 0 deletions cpp/src/delayed_submission.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
*/
#include <memory>
#include <mutex>
#include <string>
#include <utility>

#include <ucp/api/ucp.h>
Expand Down
2 changes: 2 additions & 0 deletions cpp/src/internal/request_am.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
#include <ucxx/request_am.h>
#include <ucxx/typedefs.h>

#include <memory>

namespace ucxx {

namespace internal {
Expand Down
3 changes: 2 additions & 1 deletion cpp/src/listener.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
*/
#include <memory>
#include <netinet/in.h>
#include <string>
#include <utility>

#include <ucp/api/ucp.h>
Expand Down Expand Up @@ -42,7 +43,7 @@ Listener::Listener(std::shared_ptr<Worker> worker,
ucxx::utils::sockaddr_get_ip_port_str(&attr.sockaddr, ipString, portString, INET6_ADDRSTRLEN);

_ip = std::string(ipString);
_port = (uint16_t)atoi(portString);
_port = static_cast<uint16_t>(atoi(portString));

setParent(worker);
}
Expand Down
2 changes: 1 addition & 1 deletion cpp/src/memory_handle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ MemoryHandle::MemoryHandle(std::shared_ptr<Context> context,

utils::ucsErrorThrow(ucp_mem_query(_handle, &attr));

_baseAddress = (uint64_t)attr.address;
_baseAddress = reinterpret_cast<uint64_t>(attr.address);
_size = attr.length;
_memoryType = attr.mem_type;

Expand Down
3 changes: 2 additions & 1 deletion cpp/src/remote_key.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include <memory>
#include <sstream>
#include <string>
#include <vector>

#include <ucp/api/ucp.h>

Expand Down Expand Up @@ -84,7 +85,7 @@ std::shared_ptr<RemoteKey> createRemoteKeyFromSerialized(std::shared_ptr<Endpoin

size_t RemoteKey::getSize() const { return _memorySize; }

uint64_t RemoteKey::getBaseAddress() { return (uint64_t)_memoryBaseAddress; }
uint64_t RemoteKey::getBaseAddress() { return _memoryBaseAddress; }

ucp_rkey_h RemoteKey::getHandle() { return _remoteKey; }

Expand Down
2 changes: 2 additions & 0 deletions cpp/src/request_am.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@
*/
#include <cstdio>
#include <memory>
#include <queue>
#include <sstream>
#include <stdexcept>
#include <string>
#include <vector>

#include <ucp/api/ucp.h>

Expand Down
1 change: 1 addition & 0 deletions cpp/src/request_data.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <stdexcept>
#include <vector>

#include <ucp/api/ucp.h>

Expand Down
1 change: 1 addition & 0 deletions cpp/src/request_stream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
* SPDX-FileCopyrightText: Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES.
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <cstdio>
#include <memory>
#include <string>

Expand Down
1 change: 1 addition & 0 deletions cpp/src/request_tag_multi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include <memory>
#include <mutex>
#include <string>
#include <utility>
#include <vector>

#include <ucxx/buffer.h>
Expand Down
5 changes: 3 additions & 2 deletions cpp/src/utils/sockaddr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <arpa/inet.h>
#include <cstdio>
#include <cstring>
#include <memory>
#include <netdb.h>
#include <stdlib.h>
#include <string.h>
#include <string>
#include <sys/socket.h>

#include <ucxx/exception.h>
Expand Down
1 change: 1 addition & 0 deletions cpp/src/worker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
* SPDX-FileCopyrightText: Copyright (c) 2022-2024, NVIDIA CORPORATION & AFFILIATES.
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <cstdio>
#include <functional>
#include <ios>
#include <memory>
Expand Down
1 change: 1 addition & 0 deletions cpp/tests/buffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <algorithm>
#include <memory>
#include <numeric>
#include <utility>

Expand Down
1 change: 1 addition & 0 deletions cpp/tests/context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
*/
#include <cstdlib>
#include <string>
#include <vector>

#include <gtest/gtest.h>

Expand Down

0 comments on commit 96be91f

Please sign in to comment.