Skip to content

Commit

Permalink
Formatting/Linting fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mdemoret-nv committed Jul 14, 2023
1 parent f6053ed commit d0aa315
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 29 deletions.
32 changes: 17 additions & 15 deletions ci/scripts/fix_all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,23 @@ if [[ "${SKIP_COPYRIGHT}" == "" ]]; then
python3 ./ci/scripts/copyright.py --fix-all --git-modified-only ./ 2>&1
fi

# Run include-what-you-use (before clang-format so it can fix the include order)
if [[ "${SKIP_IWYU}" == "" ]]; then

if [[ "${IWYU_TOOL}" == "" ]]; then
IWYU_TOOL=$(find_iwyu_tool)
fi

if [[ -x "${IWYU_TOOL}" ]]; then
echo "Running include-what-you-use from '${IWYU_TOOL}'..."
set -x
${IWYU_TOOL} -j $(get_num_proc) -p ${BUILD_DIR} cpp python | fix_includes.py --nosafe_headers --nocomments
set +x
else
echo "Skipping include-what-you-use. Could not find iwyu_tool.py at '${IWYU_TOOL}'"
fi
fi

# Run clang-format
if [[ "${SKIP_CLANG_FORMAT}" == "" ]]; then

Expand Down Expand Up @@ -56,21 +73,6 @@ if [[ "${SKIP_CLANG_TIDY}" == "" ]]; then
fi
fi

# Run include-what-you-use
if [[ "${SKIP_IWYU}" == "" ]]; then

if [[ "${IWYU_TOOL}" == "" ]]; then
IWYU_TOOL=$(find_iwyu_tool)
fi

if [[ -x "${IWYU_TOOL}" ]]; then
echo "Running include-what-you-use from '${IWYU_TOOL}'..."
${IWYU_TOOL} -j 0 -p ${BUILD_DIR} ${CPP_MODIFIED_FILES[@]} 2>&1
else
echo "Skipping include-what-you-use. Could not find iwyu_tool.py at '${IWYU_TOOL}'"
fi
fi

# Run isort
if [[ "${SKIP_ISORT}" == "" ]]; then
echo "Running isort..."
Expand Down
5 changes: 1 addition & 4 deletions cpp/mrc/include/mrc/core/concepts/not_void.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@
namespace mrc::core::concepts {

template <typename T>
concept not_void = requires
{
requires not std::same_as<T, void>;
};
concept not_void = requires { requires not std::same_as<T, void>; };

} // namespace mrc::core::concepts
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,8 @@
namespace mrc::modules::stream_buffers {

template <typename DataTypeT, template <typename> class StreamBufferTypeT>
concept IsStreamBuffer = requires
{
typename StreamBufferTypeT<DataTypeT>;
std::is_base_of_v<StreamBufferBase<DataTypeT>, StreamBufferTypeT<DataTypeT>>;
};
concept IsStreamBuffer = requires {
typename StreamBufferTypeT<DataTypeT>;
std::is_base_of_v<StreamBufferBase<DataTypeT>, StreamBufferTypeT<DataTypeT>>;
};
} // namespace mrc::modules::stream_buffers
8 changes: 4 additions & 4 deletions cpp/mrc/src/public/benchmarking/tracer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -232,11 +232,11 @@ void TraceAggregatorBase::process_tracer_data(const std::vector<std::shared_ptr<
m_node_count = segment_node_count;
m_tracer_count = tracers.size();
m_json_data = {
{
"metadata",
{{"elapsed_time", m_elapsed_seconds}, {"tracer_count", m_tracer_count}, {"node_count", m_node_count}},
{
"metadata",
{{"elapsed_time", m_elapsed_seconds}, {"tracer_count", m_tracer_count}, {"node_count", m_node_count}},
},
{"aggregations", {}}};
{"aggregations", {}}};

if (!cmpt_id_to_name.empty())
{
Expand Down
1 change: 0 additions & 1 deletion cpp/mrc/src/tools/topology_exporter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
#include <memory>

using namespace mrc;
using namespace internal;

int main(int argc, char* argv[])
{
Expand Down

0 comments on commit d0aa315

Please sign in to comment.