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

PS-9233: Implementation of UUID v1-v7 functions according to RFC 9562 #5313

Closed

Conversation

lukin-oleksiy
Copy link

https://perconadev.atlassian.net/browse/PS-9233

Implementation of UUID v1-v7 functions according to RFC 9562 and Boost UUID library added to support this implementation.

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Clang-Tidy found issue(s) with the introduced code (1/35)

// Distributed under the Boost Software License, Version 1.0.
// https://www.boost.org/LICENSE_1_0.txt

#include <boost/uuid/uuid.hpp>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ clang-diagnostic-error ⚠️
boost/uuid/uuid.hpp file not found

int ipos = 0;

// check open brace
char_type c = get_next_char( begin, end, ipos );

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-identifier-length ⚠️
variable name c is too short, expected at least 2 characters


bool has_dashes = false;

uuid u;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ cppcoreguidelines-init-variables ⚠️
variable u is not initialized

Suggested change
uuid u;
uuid u = 0;


bool has_dashes = false;

uuid u;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-identifier-length ⚠️
variable name u is too short, expected at least 2 characters


uuid u;

int i = 0;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-identifier-length ⚠️
variable name i is too short, expected at least 2 characters

return *begin++;
}

unsigned char get_value( char c, int ipos ) const

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-convert-member-functions-to-static ⚠️
method get_value can be made static

Suggested change
unsigned char get_value( char c, int ipos ) const
static unsigned char get_value( char c, int ipos )

return *begin++;
}

unsigned char get_value( char c, int ipos ) const

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-identifier-length ⚠️
parameter name c is too short, expected at least 2 characters

return values[ pos ];
}

unsigned char get_value( wchar_t c, int ipos ) const

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-convert-member-functions-to-static ⚠️
method get_value can be made static

Suggested change
unsigned char get_value( wchar_t c, int ipos ) const
static unsigned char get_value( wchar_t c, int ipos )

return values[ pos ];
}

unsigned char get_value( wchar_t c, int ipos ) const

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-identifier-length ⚠️
parameter name c is too short, expected at least 2 characters

return values[ pos ];
}

bool is_dash( char c ) const

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-convert-member-functions-to-static ⚠️
method is_dash can be made static

Suggested change
bool is_dash( char c ) const
static bool is_dash( char c )

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Clang-Tidy found issue(s) with the introduced code (2/35)

return values[ pos ];
}

bool is_dash( char c ) const

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-identifier-length ⚠️
parameter name c is too short, expected at least 2 characters

return c == '-';
}

bool is_dash( wchar_t c ) const

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-convert-member-functions-to-static ⚠️
method is_dash can be made static

Suggested change
bool is_dash( wchar_t c ) const
static bool is_dash( wchar_t c )

return c == '-';
}

bool is_dash( wchar_t c ) const

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-identifier-length ⚠️
parameter name c is too short, expected at least 2 characters

}

// return closing brace
bool is_open_brace( char c ) const

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-convert-member-functions-to-static ⚠️
method is_open_brace can be made static

Suggested change
bool is_open_brace( char c ) const
static bool is_open_brace( char c )

}

// return closing brace
bool is_open_brace( char c ) const

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-identifier-length ⚠️
parameter name c is too short, expected at least 2 characters

return c == '{';
}

bool is_open_brace( wchar_t c ) const

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-convert-member-functions-to-static ⚠️
method is_open_brace can be made static

Suggested change
bool is_open_brace( wchar_t c ) const
static bool is_open_brace( wchar_t c )

return c == '{';
}

bool is_open_brace( wchar_t c ) const

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-identifier-length ⚠️
parameter name c is too short, expected at least 2 characters

return c == L'{';
}

void check_close_brace( char c, char open_brace, int ipos ) const

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-convert-member-functions-to-static ⚠️
method check_close_brace can be made static

Suggested change
void check_close_brace( char c, char open_brace, int ipos ) const
static void check_close_brace( char c, char open_brace, int ipos )

return c == L'{';
}

void check_close_brace( char c, char open_brace, int ipos ) const

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-identifier-length ⚠️
parameter name c is too short, expected at least 2 characters


void check_close_brace( char c, char open_brace, int ipos ) const
{
if( open_brace == '{' && c == '}' )

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ bugprone-branch-clone ⚠️
if with identical then and else branches

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Clang-Tidy found issue(s) with the introduced code (3/35)

}
}

void check_close_brace( wchar_t c, wchar_t open_brace, int ipos ) const

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-convert-member-functions-to-static ⚠️
method check_close_brace can be made static

Suggested change
void check_close_brace( wchar_t c, wchar_t open_brace, int ipos ) const
static void check_close_brace( wchar_t c, wchar_t open_brace, int ipos )

}
}

void check_close_brace( wchar_t c, wchar_t open_brace, int ipos ) const

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-identifier-length ⚠️
parameter name c is too short, expected at least 2 characters


void check_close_brace( wchar_t c, wchar_t open_brace, int ipos ) const
{
if( open_brace == L'{' && c == L'}' )

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ bugprone-branch-clone ⚠️
if with identical then and else branches

}
};

}} // namespace boost::uuids

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ google-readability-namespace-comments ⚠️
namespace uuids not terminated with a closing comment

}
};

}} // namespace boost::uuids

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ google-readability-namespace-comments ⚠️
namespace boost ends with a comment that refers to a wrong namespace boost::uuids

// Distributed under the Boost Software License, Version 1.0.
// https://www.boost.org/LICENSE_1_0.txt

#include <boost/uuid/basic_random_generator.hpp>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ clang-diagnostic-error ⚠️
boost/uuid/basic_random_generator.hpp file not found

// only provided for compatibility with 1.85
using random_generator_pure = basic_random_generator<detail::random_device>;

}} // namespace boost::uuids

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ google-readability-namespace-comments ⚠️
namespace uuids not terminated with a closing comment

// only provided for compatibility with 1.85
using random_generator_pure = basic_random_generator<detail::random_device>;

}} // namespace boost::uuids

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ google-readability-namespace-comments ⚠️
namespace boost ends with a comment that refers to a wrong namespace boost::uuids

// Distributed under the Boost Software License, Version 1.0.
// https://www.boost.org/LICENSE_1_0.txt

#include <boost/uuid/detail/static_assert.hpp>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ clang-diagnostic-error ⚠️
boost/uuid/detail/static_assert.hpp file not found

namespace uuids {
namespace detail {

template<class T, class U> T numeric_cast( U u )

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-identifier-length ⚠️
parameter name u is too short, expected at least 2 characters

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Clang-Tidy found issue(s) with the introduced code (4/35)


if( u > std::numeric_limits<T>::max() )
{
BOOST_THROW_EXCEPTION( std::range_error( "Argument to numeric_cast is out of range of destination type" ) );

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ bugprone-throw-keyword-missing ⚠️
suspicious exception object created but not thrown; did you mean throw range_error?

return static_cast<T>( u );
}

} // detail

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ google-readability-namespace-comments ⚠️
namespace detail ends with an unrecognized comment

}

} // detail
} // uuids

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ google-readability-namespace-comments ⚠️
namespace uuids ends with an unrecognized comment


} // detail
} // uuids
} // boost

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ google-readability-namespace-comments ⚠️
namespace boost ends with an unrecognized comment

// Distributed under the Boost Software License, Version 1.0.
// https://www.boost.org/LICENSE_1_0.txt

#include <boost/uuid/uuid.hpp>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ clang-diagnostic-error ⚠️
boost/uuid/uuid.hpp file not found


std::uniform_int_distribution<std::uint32_t> dist;

result_type u;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ cppcoreguidelines-init-variables ⚠️
variable u is not initialized

Suggested change
result_type u;
result_type u = 0;


std::uniform_int_distribution<std::uint32_t> dist;

result_type u;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-identifier-length ⚠️
variable name u is too short, expected at least 2 characters

template<class MaybePseudoRandomNumberGenerator, class En = decltype( std::declval<MaybePseudoRandomNumberGenerator&>().seed() )>
void seed( MaybePseudoRandomNumberGenerator& rng, int )
{
detail::random_provider seeder;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ cppcoreguidelines-init-variables ⚠️
variable seeder is not initialized

Suggested change
detail::random_provider seeder;
detail::random_provider seeder = 0;

}
};

}} // namespace boost::uuids

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ google-readability-namespace-comments ⚠️
namespace uuids not terminated with a closing comment

}
};

}} // namespace boost::uuids

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ google-readability-namespace-comments ⚠️
namespace boost ends with a comment that refers to a wrong namespace boost::uuids

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Clang-Tidy found issue(s) with the introduced code (5/35)

// This header is no longer needed and is only retained
// for backward compatibility.

#include <boost/uuid/uuid.hpp>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ clang-diagnostic-error ⚠️
boost/uuid/uuid.hpp file not found

// This header is no longer needed and is only retained
// for backward compatibility.

#include <boost/uuid/uuid.hpp>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ clang-diagnostic-error ⚠️
boost/uuid/uuid.hpp file not found

// Distributed under the Boost Software License, Version 1.0.
// https://www.boost.org/LICENSE_1_0.txt

#include <boost/uuid/time_generator_v1.hpp>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ clang-diagnostic-error ⚠️
boost/uuid/time_generator_v1.hpp file not found

// Distributed under the Boost Software License, Version 1.0.
// https://www.boost.org/LICENSE_1_0.txt

#include <boost/uuid/uuid.hpp>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ clang-diagnostic-error ⚠️
boost/uuid/uuid.hpp file not found

// to_chars

template<class OutputIterator>
OutputIterator to_chars( uuid const& u, OutputIterator out )

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ misc-unused-parameters ⚠️
parameter u is unused

Suggested change
OutputIterator to_chars( uuid const& u, OutputIterator out )
OutputIterator to_chars( uuid const& /*u*/, OutputIterator out )

// to_chars

template<class OutputIterator>
OutputIterator to_chars( uuid const& u, OutputIterator out )

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-identifier-length ⚠️
parameter name u is too short, expected at least 2 characters

}

template<class Ch>
inline bool to_chars( uuid const& u, Ch* first, Ch* last ) noexcept

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ misc-unused-parameters ⚠️
parameter u is unused

Suggested change
inline bool to_chars( uuid const& u, Ch* first, Ch* last ) noexcept
inline bool to_chars( uuid const& /*u*/, Ch* first, Ch* last ) noexcept

}

template<class Ch>
inline bool to_chars( uuid const& u, Ch* first, Ch* last ) noexcept

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-identifier-length ⚠️
parameter name u is too short, expected at least 2 characters

Comment on lines +42 to +48
if( last - first < 36 )
{
return false;
}

detail::to_chars( u, first );
return true;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-simplify-boolean-expr ⚠️
redundant boolean literal in conditional return statement

Suggested change
if( last - first < 36 )
{
return false;
}
detail::to_chars( u, first );
return true;
return static_cast<bool>(last - first >= 36);

}

template<class Ch, std::size_t N>
inline Ch* to_chars( uuid const& u, Ch (&buffer)[ N ] ) noexcept

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ misc-unused-parameters ⚠️
parameter u is unused

Suggested change
inline Ch* to_chars( uuid const& u, Ch (&buffer)[ N ] ) noexcept
inline Ch* to_chars( uuid const& /*u*/, Ch (&buffer)[ N ] ) noexcept

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Clang-Tidy found issue(s) with the introduced code (6/35)

}

template<class Ch, std::size_t N>
inline Ch* to_chars( uuid const& u, Ch (&buffer)[ N ] ) noexcept

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-identifier-length ⚠️
parameter name u is too short, expected at least 2 characters

// only provided for compatibility; deprecated
template<class Ch>
// BOOST_DEPRECATED( "Use Ch[37] instead of Ch[36] to allow for the null terminator" )
inline Ch* to_chars( uuid const& u, Ch (&buffer)[ 36 ] ) noexcept

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ misc-unused-parameters ⚠️
parameter u is unused

Suggested change
inline Ch* to_chars( uuid const& u, Ch (&buffer)[ 36 ] ) noexcept
inline Ch* to_chars( uuid const& /*u*/, Ch (&buffer)[ 36 ] ) noexcept

// only provided for compatibility; deprecated
template<class Ch>
// BOOST_DEPRECATED( "Use Ch[37] instead of Ch[36] to allow for the null terminator" )
inline Ch* to_chars( uuid const& u, Ch (&buffer)[ 36 ] ) noexcept

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-identifier-length ⚠️
parameter name u is too short, expected at least 2 characters

// operator<<

template<class Ch, class Traits>
std::basic_ostream<Ch, Traits>& operator<<( std::basic_ostream<Ch, Traits>& os, uuid const& u )

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ misc-unused-parameters ⚠️
parameter u is unused

Suggested change
std::basic_ostream<Ch, Traits>& operator<<( std::basic_ostream<Ch, Traits>& os, uuid const& u )
std::basic_ostream<Ch, Traits>& operator<<( std::basic_ostream<Ch, Traits>& os, uuid const& /*u*/ )

// operator<<

template<class Ch, class Traits>
std::basic_ostream<Ch, Traits>& operator<<( std::basic_ostream<Ch, Traits>& os, uuid const& u )

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-identifier-length ⚠️
parameter name u is too short, expected at least 2 characters

// operator>>

template<class Ch, class Traits>
std::basic_istream<Ch, Traits>& operator>>( std::basic_istream<Ch, Traits>& is, uuid& u )

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ misc-unused-parameters ⚠️
parameter u is unused

Suggested change
std::basic_istream<Ch, Traits>& operator>>( std::basic_istream<Ch, Traits>& is, uuid& u )
std::basic_istream<Ch, Traits>& operator>>( std::basic_istream<Ch, Traits>& is, uuid& /*u*/ )

// operator>>

template<class Ch, class Traits>
std::basic_istream<Ch, Traits>& operator>>( std::basic_istream<Ch, Traits>& is, uuid& u )

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-identifier-length ⚠️
parameter name u is too short, expected at least 2 characters


Ch* const xdigits_end = xdigits + 16;

Ch c;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-identifier-length ⚠️
variable name c is too short, expected at least 2 characters


// to_string

inline std::string to_string( uuid const& u )

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ misc-unused-parameters ⚠️
parameter u is unused

Suggested change
inline std::string to_string( uuid const& u )
inline std::string to_string( uuid const& /*u*/ )


// to_string

inline std::string to_string( uuid const& u )

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-identifier-length ⚠️
parameter name u is too short, expected at least 2 characters

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Clang-Tidy found issue(s) with the introduced code (7/35)

return result;
}

inline std::wstring to_wstring( uuid const& u )

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ misc-unused-parameters ⚠️
parameter u is unused

Suggested change
inline std::wstring to_wstring( uuid const& u )
inline std::wstring to_wstring( uuid const& /*u*/ )

return result;
}

inline std::wstring to_wstring( uuid const& u )

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-identifier-length ⚠️
parameter name u is too short, expected at least 2 characters

return result;
}

}} //namespace boost::uuids

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ google-readability-namespace-comments ⚠️
namespace uuids not terminated with a closing comment

return result;
}

}} //namespace boost::uuids

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ google-readability-namespace-comments ⚠️
namespace boost ends with a comment that refers to a wrong namespace boost::uuids

// Distributed under the Boost Software License, Version 1.0.
// https://www.boost.org/LICENSE_1_0.txt

#include <boost/uuid/uuid.hpp>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ clang-diagnostic-error ⚠️
boost/uuid/uuid.hpp file not found


// time_generator_v7

class time_generator_v7

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ cppcoreguidelines-special-member-functions ⚠️
class time_generator_v7 defines a copy constructor, a copy assignment operator, a move constructor and a move assignment operator but does not define a destructor


state_type state_ = {};

detail::chacha20_12 rng_;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ cppcoreguidelines-pro-type-member-init ⚠️
constructor does not initialize these fields: rng_

Suggested change
detail::chacha20_12 rng_;
detail::chacha20_12 rng_{};


inline time_generator_v7::time_generator_v7()
{
detail::random_provider seeder;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ cppcoreguidelines-init-variables ⚠️
variable seeder is not initialized

Suggested change
detail::random_provider seeder;
detail::random_provider seeder = 0;

rng_.seed( seeder );
}

inline time_generator_v7::time_generator_v7( time_generator_v7 const& rhs ): state_( rhs.state_ )

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ cppcoreguidelines-pro-type-member-init ⚠️
constructor does not initialize these fields: rng_


inline time_generator_v7::time_generator_v7( time_generator_v7 const& rhs ): state_( rhs.state_ )
{
detail::random_provider seeder;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ cppcoreguidelines-init-variables ⚠️
variable seeder is not initialized

Suggested change
detail::random_provider seeder;
detail::random_provider seeder = 0;

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Clang-Tidy found issue(s) with the introduced code (8/35)

rng_.seed( seeder );
}

inline time_generator_v7::time_generator_v7( time_generator_v7&& rhs ) noexcept: state_( std::move( rhs.state_ ) ), rng_( std::move( rhs.rng_ ) )

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ cppcoreguidelines-pro-type-member-init ⚠️
constructor does not initialize these fields: rng_

inline time_generator_v7::state_type time_generator_v7::get_new_state( state_type const& oldst ) noexcept
{
// `now()` in microseconds
std::uint64_t now_in_us = std::chrono::time_point_cast< std::chrono::microseconds >( std::chrono::system_clock::now() ).time_since_epoch().count();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ cppcoreguidelines-init-variables ⚠️
variable now_in_us is not initialized

Suggested change
std::uint64_t now_in_us = std::chrono::time_point_cast< std::chrono::microseconds >( std::chrono::system_clock::now() ).time_since_epoch().count();
std::uint64_t now_in_us = 0 = std::chrono::time_point_cast< std::chrono::microseconds >( std::chrono::system_clock::now() ).time_since_epoch().count();


inline time_generator_v7::result_type time_generator_v7::operator()() noexcept
{
uuid result;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ cppcoreguidelines-init-variables ⚠️
variable result is not initialized

Suggested change
uuid result;
uuid result = 0;

return result;
}

}} // namespace boost::uuids

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ google-readability-namespace-comments ⚠️
namespace uuids not terminated with a closing comment

return result;
}

}} // namespace boost::uuids

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ google-readability-namespace-comments ⚠️
namespace boost ends with a comment that refers to a wrong namespace boost::uuids

// Distributed under the Boost Software License, Version 1.0.
// https://www.boost.org/LICENSE_1_0.txt

#include <boost/uuid/detail/basic_name_generator.hpp>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ clang-diagnostic-error ⚠️
boost/uuid/detail/basic_name_generator.hpp file not found

}
};

} // uuids

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ google-readability-namespace-comments ⚠️
namespace uuids ends with an unrecognized comment

};

} // uuids
} // boost

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ google-readability-namespace-comments ⚠️
namespace boost ends with an unrecognized comment

*/
class uuid_vx_version_impl {
public:
uuid_vx_version_impl(mysqlpp::udf_context &ctx) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ google-explicit-constructor ⚠️
single-argument constructors must be marked explicit to avoid unintentional implicit conversions

Suggested change
uuid_vx_version_impl(mysqlpp::udf_context &ctx) {
explicit uuid_vx_version_impl(mysqlpp::udf_context &ctx) {

try {
boost::uuids::string_generator gen;
auto uxs = ctx.get_arg<STRING_RESULT>(0);
boost::uuids::uuid u = gen(uxs.data());

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-identifier-length ⚠️
variable name u is too short, expected at least 2 characters

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Clang-Tidy found issue(s) with the introduced code (9/35)

*/
class uuid_vx_variant_impl {
public:
uuid_vx_variant_impl(mysqlpp::udf_context &ctx) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ google-explicit-constructor ⚠️
single-argument constructors must be marked explicit to avoid unintentional implicit conversions

Suggested change
uuid_vx_variant_impl(mysqlpp::udf_context &ctx) {
explicit uuid_vx_variant_impl(mysqlpp::udf_context &ctx) {

try {
boost::uuids::string_generator gen;
auto uxs = ctx.get_arg<STRING_RESULT>(0);
boost::uuids::uuid u = gen(uxs.data());

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-identifier-length ⚠️
variable name u is too short, expected at least 2 characters

*/
class is_uuid_vx_impl {
public:
is_uuid_vx_impl(mysqlpp::udf_context &ctx) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ google-explicit-constructor ⚠️
single-argument constructors must be marked explicit to avoid unintentional implicit conversions

Suggested change
is_uuid_vx_impl(mysqlpp::udf_context &ctx) {
explicit is_uuid_vx_impl(mysqlpp::udf_context &ctx) {

*/
class is_nil_uuid_vx_impl {
public:
is_nil_uuid_vx_impl(mysqlpp::udf_context &ctx) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ google-explicit-constructor ⚠️
single-argument constructors must be marked explicit to avoid unintentional implicit conversions

Suggested change
is_nil_uuid_vx_impl(mysqlpp::udf_context &ctx) {
explicit is_nil_uuid_vx_impl(mysqlpp::udf_context &ctx) {

try {
boost::uuids::string_generator gen;
auto uxs = ctx.get_arg<STRING_RESULT>(0);
boost::uuids::uuid u = gen(uxs.data());

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-identifier-length ⚠️
variable name u is too short, expected at least 2 characters

public:
static const boost::uuids::uuid max_uuid;

is_max_uuid_vx_impl(mysqlpp::udf_context &ctx) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ google-explicit-constructor ⚠️
single-argument constructors must be marked explicit to avoid unintentional implicit conversions

Suggested change
is_max_uuid_vx_impl(mysqlpp::udf_context &ctx) {
explicit is_max_uuid_vx_impl(mysqlpp::udf_context &ctx) {

try {
boost::uuids::string_generator gen;
auto uxs = ctx.get_arg<STRING_RESULT>(0);
boost::uuids::uuid u = gen(uxs.data());

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-identifier-length ⚠️
variable name u is too short, expected at least 2 characters

*/
class uuid_v1_impl {
public:
uuid_v1_impl(mysqlpp::udf_context &ctx) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ google-explicit-constructor ⚠️
single-argument constructors must be marked explicit to avoid unintentional implicit conversions

Suggested change
uuid_v1_impl(mysqlpp::udf_context &ctx) {
explicit uuid_v1_impl(mysqlpp::udf_context &ctx) {

*/
class string_based_uuid {
public:
inline boost::uuids::uuid get_uuid_namespace(int name_index) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-convert-member-functions-to-static ⚠️
method get_uuid_namespace can be made static

Suggested change
inline boost::uuids::uuid get_uuid_namespace(int name_index) {
static inline boost::uuids::uuid get_uuid_namespace(int name_index) {

*/
class uuid_v3_impl : string_based_uuid {
public:
uuid_v3_impl(mysqlpp::udf_context &ctx) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ google-explicit-constructor ⚠️
single-argument constructors must be marked explicit to avoid unintentional implicit conversions

Suggested change
uuid_v3_impl(mysqlpp::udf_context &ctx) {
explicit uuid_v3_impl(mysqlpp::udf_context &ctx) {

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Clang-Tidy found issue(s) with the introduced code (10/35)

}
}
boost::uuids::name_generator_md5 gen_v3(get_uuid_namespace(ns_index));
std::string s(the_string);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-identifier-length ⚠️
variable name s is too short, expected at least 2 characters

*/
class uuid_v4_impl {
public:
uuid_v4_impl(mysqlpp::udf_context &ctx) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ google-explicit-constructor ⚠️
single-argument constructors must be marked explicit to avoid unintentional implicit conversions

Suggested change
uuid_v4_impl(mysqlpp::udf_context &ctx) {
explicit uuid_v4_impl(mysqlpp::udf_context &ctx) {

*/
class uuid_v5_impl : string_based_uuid {
public:
uuid_v5_impl(mysqlpp::udf_context &ctx) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ google-explicit-constructor ⚠️
single-argument constructors must be marked explicit to avoid unintentional implicit conversions

Suggested change
uuid_v5_impl(mysqlpp::udf_context &ctx) {
explicit uuid_v5_impl(mysqlpp::udf_context &ctx) {

}
}
boost::uuids::name_generator_sha1 gen_v5(get_uuid_namespace(ns_index));
std::string s(the_string);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-identifier-length ⚠️
variable name s is too short, expected at least 2 characters

*/
class uuid_v6_impl {
public:
uuid_v6_impl(mysqlpp::udf_context &ctx) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ google-explicit-constructor ⚠️
single-argument constructors must be marked explicit to avoid unintentional implicit conversions

Suggested change
uuid_v6_impl(mysqlpp::udf_context &ctx) {
explicit uuid_v6_impl(mysqlpp::udf_context &ctx) {

*/
class uuid_v7_impl {
public:
uuid_v7_impl(mysqlpp::udf_context &ctx) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ google-explicit-constructor ⚠️
single-argument constructors must be marked explicit to avoid unintentional implicit conversions

Suggested change
uuid_v7_impl(mysqlpp::udf_context &ctx) {
explicit uuid_v7_impl(mysqlpp::udf_context &ctx) {

* ofs_ms argument is of type "long" so it will not cause integer overflow.
* @return time-shifted UUID v7
*/
boost::uuids::uuid add_ts_offset(boost::uuids::uuid u, long ofs_ms) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-convert-member-functions-to-static ⚠️
method add_ts_offset can be made static

Suggested change
boost::uuids::uuid add_ts_offset(boost::uuids::uuid u, long ofs_ms) {
static boost::uuids::uuid add_ts_offset(boost::uuids::uuid u, long ofs_ms) {

* ofs_ms argument is of type "long" so it will not cause integer overflow.
* @return time-shifted UUID v7
*/
boost::uuids::uuid add_ts_offset(boost::uuids::uuid u, long ofs_ms) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-identifier-length ⚠️
parameter name u is too short, expected at least 2 characters

*/
class nil_uuid_vx_impl {
public:
nil_uuid_vx_impl(mysqlpp::udf_context &ctx) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ google-explicit-constructor ⚠️
single-argument constructors must be marked explicit to avoid unintentional implicit conversions

Suggested change
nil_uuid_vx_impl(mysqlpp::udf_context &ctx) {
explicit nil_uuid_vx_impl(mysqlpp::udf_context &ctx) {

*/
class max_uuid_vx_impl {
public:
max_uuid_vx_impl(mysqlpp::udf_context &ctx) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ google-explicit-constructor ⚠️
single-argument constructors must be marked explicit to avoid unintentional implicit conversions

Suggested change
max_uuid_vx_impl(mysqlpp::udf_context &ctx) {
explicit max_uuid_vx_impl(mysqlpp::udf_context &ctx) {

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Clang-Tidy found issue(s) with the introduced code (11/35)

*/
class uuid_vx_to_bin_impl {
public:
uuid_vx_to_bin_impl(mysqlpp::udf_context &ctx) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ google-explicit-constructor ⚠️
single-argument constructors must be marked explicit to avoid unintentional implicit conversions

Suggested change
uuid_vx_to_bin_impl(mysqlpp::udf_context &ctx) {
explicit uuid_vx_to_bin_impl(mysqlpp::udf_context &ctx) {

return {};
}
char result[uuid_size_in_bytes + 1];
boost::uuids::uuid u;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-identifier-length ⚠️
variable name u is too short, expected at least 2 characters

try {
u = gen(uxs.data());
for (size_t i = 0; i < uuid_size_in_bytes; i++) {
result[i] = (uint8_t)u.data[i];

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ google-readability-casting ⚠️
C-style casts are discouraged; use static_cast (if needed, the cast may be redundant)

Suggested change
result[i] = (uint8_t)u.data[i];
result[i] = static_cast<uint8_t>(u.data[i]);

*/
class bin_to_uuid_vx_impl {
public:
bin_to_uuid_vx_impl(mysqlpp::udf_context &ctx) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ google-explicit-constructor ⚠️
single-argument constructors must be marked explicit to avoid unintentional implicit conversions

Suggested change
bin_to_uuid_vx_impl(mysqlpp::udf_context &ctx) {
explicit bin_to_uuid_vx_impl(mysqlpp::udf_context &ctx) {

raise<std::invalid_argument>(err_msg_16bytes);
}

boost::uuids::uuid u;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-identifier-length ⚠️
variable name u is too short, expected at least 2 characters

/**
* Returns time in ms since epoch
*/
inline u_int64_t get_ts(std::string_view uxs) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-convert-member-functions-to-static ⚠️
method get_ts can be made static

Suggested change
inline u_int64_t get_ts(std::string_view uxs) {
static inline u_int64_t get_ts(std::string_view uxs) {

*/
inline u_int64_t get_ts(std::string_view uxs) {
boost::uuids::string_generator gen;
boost::uuids::uuid u;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-identifier-length ⚠️
variable name u is too short, expected at least 2 characters

* @return String timestamp representation tin the form like 2024-05-29
* 18:04:14.201
*/
inline std::string get_timestamp(uint64_t milliseconds) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-convert-member-functions-to-static ⚠️
method get_timestamp can be made static

Suggested change
inline std::string get_timestamp(uint64_t milliseconds) {
static inline std::string get_timestamp(uint64_t milliseconds) {

* @return String timestamp representation tin the form like Wed May 29
* 18:05:07 2024 GMT
*/
inline std::string get_timestamp_with_tz(uint64_t milliseconds) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-convert-member-functions-to-static ⚠️
method get_timestamp_with_tz can be made static

Suggested change
inline std::string get_timestamp_with_tz(uint64_t milliseconds) {
static inline std::string get_timestamp_with_tz(uint64_t milliseconds) {

*/
class uuid_vx_to_timestamp_impl : timestamp_based_uuid {
public:
uuid_vx_to_timestamp_impl(mysqlpp::udf_context &ctx) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ google-explicit-constructor ⚠️
single-argument constructors must be marked explicit to avoid unintentional implicit conversions

Suggested change
uuid_vx_to_timestamp_impl(mysqlpp::udf_context &ctx) {
explicit uuid_vx_to_timestamp_impl(mysqlpp::udf_context &ctx) {

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Clang-Tidy found issue(s) with the introduced code (12/35)

*/
class uuid_vx_to_timestamp_tz_impl : timestamp_based_uuid {
public:
uuid_vx_to_timestamp_tz_impl(mysqlpp::udf_context &ctx) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ google-explicit-constructor ⚠️
single-argument constructors must be marked explicit to avoid unintentional implicit conversions

Suggested change
uuid_vx_to_timestamp_tz_impl(mysqlpp::udf_context &ctx) {
explicit uuid_vx_to_timestamp_tz_impl(mysqlpp::udf_context &ctx) {

*/
class uuid_vx_to_unixtime_impl : timestamp_based_uuid {
public:
uuid_vx_to_unixtime_impl(mysqlpp::udf_context &ctx) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ google-explicit-constructor ⚠️
single-argument constructors must be marked explicit to avoid unintentional implicit conversions

Suggested change
uuid_vx_to_unixtime_impl(mysqlpp::udf_context &ctx) {
explicit uuid_vx_to_unixtime_impl(mysqlpp::udf_context &ctx) {


} // namespace

DECLARE_INT_UDF_AUTO(uuid_vx_version)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ cppcoreguidelines-init-variables ⚠️
variable initid is not initialized


} // namespace

DECLARE_INT_UDF_AUTO(uuid_vx_version)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ misc-unused-parameters ⚠️
parameter initid is unused

} // namespace

DECLARE_INT_UDF_AUTO(uuid_vx_version)
DECLARE_INT_UDF_AUTO(uuid_vx_variant)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ cppcoreguidelines-init-variables ⚠️
variable initid is not initialized

} // namespace

DECLARE_INT_UDF_AUTO(uuid_vx_version)
DECLARE_INT_UDF_AUTO(uuid_vx_variant)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ misc-unused-parameters ⚠️
parameter initid is unused


DECLARE_INT_UDF_AUTO(uuid_vx_version)
DECLARE_INT_UDF_AUTO(uuid_vx_variant)
DECLARE_INT_UDF_AUTO(is_uuid_vx)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ cppcoreguidelines-init-variables ⚠️
variable initid is not initialized


DECLARE_INT_UDF_AUTO(uuid_vx_version)
DECLARE_INT_UDF_AUTO(uuid_vx_variant)
DECLARE_INT_UDF_AUTO(is_uuid_vx)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ misc-unused-parameters ⚠️
parameter initid is unused

DECLARE_INT_UDF_AUTO(uuid_vx_version)
DECLARE_INT_UDF_AUTO(uuid_vx_variant)
DECLARE_INT_UDF_AUTO(is_uuid_vx)
DECLARE_INT_UDF_AUTO(is_nil_uuid_vx)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ cppcoreguidelines-init-variables ⚠️
variable initid is not initialized

DECLARE_INT_UDF_AUTO(uuid_vx_version)
DECLARE_INT_UDF_AUTO(uuid_vx_variant)
DECLARE_INT_UDF_AUTO(is_uuid_vx)
DECLARE_INT_UDF_AUTO(is_nil_uuid_vx)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ misc-unused-parameters ⚠️
parameter initid is unused

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Clang-Tidy found issue(s) with the introduced code (13/35)

DECLARE_INT_UDF_AUTO(uuid_vx_variant)
DECLARE_INT_UDF_AUTO(is_uuid_vx)
DECLARE_INT_UDF_AUTO(is_nil_uuid_vx)
DECLARE_INT_UDF_AUTO(is_max_uuid_vx)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ cppcoreguidelines-init-variables ⚠️
variable initid is not initialized

DECLARE_INT_UDF_AUTO(uuid_vx_variant)
DECLARE_INT_UDF_AUTO(is_uuid_vx)
DECLARE_INT_UDF_AUTO(is_nil_uuid_vx)
DECLARE_INT_UDF_AUTO(is_max_uuid_vx)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ misc-unused-parameters ⚠️
parameter initid is unused

DECLARE_INT_UDF_AUTO(is_nil_uuid_vx)
DECLARE_INT_UDF_AUTO(is_max_uuid_vx)
// requires invoke of g++ with -latomic
DECLARE_STRING_UDF_AUTO(uuid_v1)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ cppcoreguidelines-init-variables ⚠️
variable initid is not initialized

DECLARE_INT_UDF_AUTO(is_nil_uuid_vx)
DECLARE_INT_UDF_AUTO(is_max_uuid_vx)
// requires invoke of g++ with -latomic
DECLARE_STRING_UDF_AUTO(uuid_v1)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ misc-unused-parameters ⚠️
parameter initid is unused

DECLARE_INT_UDF_AUTO(is_max_uuid_vx)
// requires invoke of g++ with -latomic
DECLARE_STRING_UDF_AUTO(uuid_v1)
DECLARE_STRING_UDF_AUTO(uuid_v3)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ cppcoreguidelines-init-variables ⚠️
variable initid is not initialized

DECLARE_INT_UDF_AUTO(is_max_uuid_vx)
// requires invoke of g++ with -latomic
DECLARE_STRING_UDF_AUTO(uuid_v1)
DECLARE_STRING_UDF_AUTO(uuid_v3)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ misc-unused-parameters ⚠️
parameter initid is unused

// requires invoke of g++ with -latomic
DECLARE_STRING_UDF_AUTO(uuid_v1)
DECLARE_STRING_UDF_AUTO(uuid_v3)
DECLARE_STRING_UDF_AUTO(uuid_v4)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ cppcoreguidelines-init-variables ⚠️
variable initid is not initialized

// requires invoke of g++ with -latomic
DECLARE_STRING_UDF_AUTO(uuid_v1)
DECLARE_STRING_UDF_AUTO(uuid_v3)
DECLARE_STRING_UDF_AUTO(uuid_v4)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ misc-unused-parameters ⚠️
parameter initid is unused

DECLARE_STRING_UDF_AUTO(uuid_v1)
DECLARE_STRING_UDF_AUTO(uuid_v3)
DECLARE_STRING_UDF_AUTO(uuid_v4)
DECLARE_STRING_UDF_AUTO(uuid_v5)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ cppcoreguidelines-init-variables ⚠️
variable initid is not initialized

DECLARE_STRING_UDF_AUTO(uuid_v1)
DECLARE_STRING_UDF_AUTO(uuid_v3)
DECLARE_STRING_UDF_AUTO(uuid_v4)
DECLARE_STRING_UDF_AUTO(uuid_v5)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ misc-unused-parameters ⚠️
parameter initid is unused

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Clang-Tidy found issue(s) with the introduced code (14/35)

DECLARE_STRING_UDF_AUTO(uuid_v4)
DECLARE_STRING_UDF_AUTO(uuid_v5)
// requires invoke of g++ with -latomic
DECLARE_STRING_UDF_AUTO(uuid_v6)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ cppcoreguidelines-init-variables ⚠️
variable initid is not initialized

DECLARE_STRING_UDF_AUTO(uuid_v4)
DECLARE_STRING_UDF_AUTO(uuid_v5)
// requires invoke of g++ with -latomic
DECLARE_STRING_UDF_AUTO(uuid_v6)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ misc-unused-parameters ⚠️
parameter initid is unused

DECLARE_STRING_UDF_AUTO(uuid_v5)
// requires invoke of g++ with -latomic
DECLARE_STRING_UDF_AUTO(uuid_v6)
DECLARE_STRING_UDF_AUTO(uuid_v7)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ cppcoreguidelines-init-variables ⚠️
variable initid is not initialized

DECLARE_STRING_UDF_AUTO(uuid_v5)
// requires invoke of g++ with -latomic
DECLARE_STRING_UDF_AUTO(uuid_v6)
DECLARE_STRING_UDF_AUTO(uuid_v7)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ misc-unused-parameters ⚠️
parameter initid is unused

// requires invoke of g++ with -latomic
DECLARE_STRING_UDF_AUTO(uuid_v6)
DECLARE_STRING_UDF_AUTO(uuid_v7)
DECLARE_STRING_UDF_AUTO(nil_uuid_vx)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ cppcoreguidelines-init-variables ⚠️
variable initid is not initialized

// requires invoke of g++ with -latomic
DECLARE_STRING_UDF_AUTO(uuid_v6)
DECLARE_STRING_UDF_AUTO(uuid_v7)
DECLARE_STRING_UDF_AUTO(nil_uuid_vx)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ misc-unused-parameters ⚠️
parameter initid is unused

DECLARE_STRING_UDF_AUTO(uuid_v6)
DECLARE_STRING_UDF_AUTO(uuid_v7)
DECLARE_STRING_UDF_AUTO(nil_uuid_vx)
DECLARE_STRING_UDF_AUTO(max_uuid_vx)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ cppcoreguidelines-init-variables ⚠️
variable initid is not initialized

DECLARE_STRING_UDF_AUTO(uuid_v6)
DECLARE_STRING_UDF_AUTO(uuid_v7)
DECLARE_STRING_UDF_AUTO(nil_uuid_vx)
DECLARE_STRING_UDF_AUTO(max_uuid_vx)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ misc-unused-parameters ⚠️
parameter initid is unused

DECLARE_STRING_UDF_AUTO(uuid_v7)
DECLARE_STRING_UDF_AUTO(nil_uuid_vx)
DECLARE_STRING_UDF_AUTO(max_uuid_vx)
DECLARE_STRING_UDF_AUTO(uuid_vx_to_bin)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ cppcoreguidelines-init-variables ⚠️
variable initid is not initialized

DECLARE_STRING_UDF_AUTO(uuid_v7)
DECLARE_STRING_UDF_AUTO(nil_uuid_vx)
DECLARE_STRING_UDF_AUTO(max_uuid_vx)
DECLARE_STRING_UDF_AUTO(uuid_vx_to_bin)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ misc-unused-parameters ⚠️
parameter initid is unused

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Clang-Tidy found issue(s) with the introduced code (15/35)

DECLARE_STRING_UDF_AUTO(nil_uuid_vx)
DECLARE_STRING_UDF_AUTO(max_uuid_vx)
DECLARE_STRING_UDF_AUTO(uuid_vx_to_bin)
DECLARE_STRING_UDF_AUTO(bin_to_uuid_vx)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ cppcoreguidelines-init-variables ⚠️
variable initid is not initialized

DECLARE_STRING_UDF_AUTO(nil_uuid_vx)
DECLARE_STRING_UDF_AUTO(max_uuid_vx)
DECLARE_STRING_UDF_AUTO(uuid_vx_to_bin)
DECLARE_STRING_UDF_AUTO(bin_to_uuid_vx)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ misc-unused-parameters ⚠️
parameter initid is unused

DECLARE_STRING_UDF_AUTO(max_uuid_vx)
DECLARE_STRING_UDF_AUTO(uuid_vx_to_bin)
DECLARE_STRING_UDF_AUTO(bin_to_uuid_vx)
DECLARE_STRING_UDF_AUTO(uuid_vx_to_timestamp)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ cppcoreguidelines-init-variables ⚠️
variable initid is not initialized

DECLARE_STRING_UDF_AUTO(max_uuid_vx)
DECLARE_STRING_UDF_AUTO(uuid_vx_to_bin)
DECLARE_STRING_UDF_AUTO(bin_to_uuid_vx)
DECLARE_STRING_UDF_AUTO(uuid_vx_to_timestamp)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ misc-unused-parameters ⚠️
parameter initid is unused

DECLARE_STRING_UDF_AUTO(uuid_vx_to_bin)
DECLARE_STRING_UDF_AUTO(bin_to_uuid_vx)
DECLARE_STRING_UDF_AUTO(uuid_vx_to_timestamp)
DECLARE_STRING_UDF_AUTO(uuid_vx_to_timestamp_tz)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ cppcoreguidelines-init-variables ⚠️
variable initid is not initialized

DECLARE_STRING_UDF_AUTO(uuid_vx_to_bin)
DECLARE_STRING_UDF_AUTO(bin_to_uuid_vx)
DECLARE_STRING_UDF_AUTO(uuid_vx_to_timestamp)
DECLARE_STRING_UDF_AUTO(uuid_vx_to_timestamp_tz)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ misc-unused-parameters ⚠️
parameter initid is unused

DECLARE_STRING_UDF_AUTO(bin_to_uuid_vx)
DECLARE_STRING_UDF_AUTO(uuid_vx_to_timestamp)
DECLARE_STRING_UDF_AUTO(uuid_vx_to_timestamp_tz)
DECLARE_INT_UDF_AUTO(uuid_vx_to_unixtime)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ cppcoreguidelines-init-variables ⚠️
variable initid is not initialized

DECLARE_STRING_UDF_AUTO(bin_to_uuid_vx)
DECLARE_STRING_UDF_AUTO(uuid_vx_to_timestamp)
DECLARE_STRING_UDF_AUTO(uuid_vx_to_timestamp_tz)
DECLARE_INT_UDF_AUTO(uuid_vx_to_unixtime)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ misc-unused-parameters ⚠️
parameter initid is unused

BEGIN_COMPONENT_PROVIDES(CURRENT_COMPONENT_NAME)
END_COMPONENT_PROVIDES();

BEGIN_COMPONENT_REQUIRES(CURRENT_COMPONENT_NAME)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ cppcoreguidelines-pro-type-const-cast ⚠️
do not use const_cast

END_COMPONENT_PROVIDES();

BEGIN_COMPONENT_REQUIRES(CURRENT_COMPONENT_NAME)
REQUIRES_SERVICE(mysql_runtime_error),

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ cppcoreguidelines-pro-type-const-cast ⚠️
do not use const_cast

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Clang-Tidy found issue(s) with the introduced code (16/35)


BEGIN_COMPONENT_REQUIRES(CURRENT_COMPONENT_NAME)
REQUIRES_SERVICE(mysql_runtime_error),
REQUIRES_SERVICE(udf_registration),

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ cppcoreguidelines-pro-type-const-cast ⚠️
do not use const_cast

BEGIN_COMPONENT_REQUIRES(CURRENT_COMPONENT_NAME)
REQUIRES_SERVICE(mysql_runtime_error),
REQUIRES_SERVICE(udf_registration),
REQUIRES_SERVICE(mysql_udf_metadata),

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ cppcoreguidelines-pro-type-const-cast ⚠️
do not use const_cast

// accompanying file LICENSE_1_0.txt or copy at
// https://www.boost.org/LICENSE_1_0.txt)

#include <boost/uuid/namespaces.hpp>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ clang-diagnostic-error ⚠️
boost/uuid/namespaces.hpp file not found


uuid namespace_uuid_;

private:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-redundant-access-specifiers ⚠️
redundant access specifier has the same accessibility as the previous access specifier

Suggested change
private:

{
private:

uuid namespace_uuid_;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ cppcoreguidelines-pro-type-member-init ⚠️
constructor does not initialize these fields: namespace_uuid_

Suggested change
uuid namespace_uuid_;
uuid namespace_uuid_{};


private:

void process_characters( HashAlgo& hash, char const* p, std::size_t n ) const noexcept

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-identifier-length ⚠️
parameter name p is too short, expected at least 2 characters

// For portability, we convert all wide characters to uint32_t so that each
// character is 4 bytes regardless of sizeof(wchar_t).

void process_characters( HashAlgo& hash, wchar_t const* p, std::size_t n ) const noexcept

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-identifier-length ⚠️
parameter name p is too short, expected at least 2 characters


for( std::size_t i = 0; i < n; ++i)
{
std::uint32_t ch = p[ i ];

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ bugprone-signed-char-misuse ⚠️
signed char to std::uint32_t (aka unsigned int) conversion; consider casting to unsigned char first.

}
}

void process_characters( HashAlgo& hash, char32_t const* p, std::size_t n ) const noexcept

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-identifier-length ⚠️
parameter name p is too short, expected at least 2 characters

}
}

void process_characters( HashAlgo& hash, char16_t const* p, std::size_t n ) const noexcept

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-identifier-length ⚠️
parameter name p is too short, expected at least 2 characters

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Clang-Tidy found issue(s) with the introduced code (17/35)


BOOST_UUID_STATIC_ASSERT( sizeof(digest_type) >= 16 );

uuid u;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ cppcoreguidelines-init-variables ⚠️
variable u is not initialized

Suggested change
uuid u;
uuid u = 0;


BOOST_UUID_STATIC_ASSERT( sizeof(digest_type) >= 16 );

uuid u;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-identifier-length ⚠️
variable name u is too short, expected at least 2 characters

};

} // namespace detail
} // uuids

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ google-readability-namespace-comments ⚠️
namespace uuids ends with an unrecognized comment


} // namespace detail
} // uuids
} // boost

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ google-readability-namespace-comments ⚠️
namespace boost ends with an unrecognized comment

// Distributed under the Boost Software License, Version 1.0.
// https://www.boost.org/LICENSE_1_0.txt

#include <boost/uuid/uuid.hpp>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ clang-diagnostic-error ⚠️
boost/uuid/uuid.hpp file not found


inline uuid dns() noexcept
{
uuid result = {{

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ cppcoreguidelines-init-variables ⚠️
variable result is not initialized

Suggested change
uuid result = {{
uuid result = 0 = {{


inline uuid url() noexcept
{
uuid result = {{

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ cppcoreguidelines-init-variables ⚠️
variable result is not initialized

Suggested change
uuid result = {{
uuid result = 0 = {{


inline uuid oid() noexcept
{
uuid result = {{

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ cppcoreguidelines-init-variables ⚠️
variable result is not initialized

Suggested change
uuid result = {{
uuid result = 0 = {{


inline uuid x500dn() noexcept
{
uuid result = {{

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ cppcoreguidelines-init-variables ⚠️
variable result is not initialized

Suggested change
uuid result = {{
uuid result = 0 = {{

return result;
}

}}} // namespace boost::uuids::ns

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ google-readability-namespace-comments ⚠️
namespace ns not terminated with a closing comment

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Clang-Tidy found issue(s) with the introduced code (18/35)

return result;
}

}}} // namespace boost::uuids::ns

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ google-readability-namespace-comments ⚠️
namespace uuids not terminated with a closing comment

return result;
}

}}} // namespace boost::uuids::ns

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ google-readability-namespace-comments ⚠️
namespace boost ends with a comment that refers to a wrong namespace boost::uuids::ns

// Distributed under the Boost Software License, Version 1.0.
// https://www.boost.org/LICENSE_1_0.txt

#include <boost/uuid/uuid.hpp>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ clang-diagnostic-error ⚠️
boost/uuid/uuid.hpp file not found

return {{}};
}

}} // namespace boost::uuids

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ google-readability-namespace-comments ⚠️
namespace uuids not terminated with a closing comment

return {{}};
}

}} // namespace boost::uuids

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ google-readability-namespace-comments ⚠️
namespace boost ends with a comment that refers to a wrong namespace boost::uuids


#if defined(__GNUC__) || defined(__clang__)

inline std::uint16_t byteswap( std::uint16_t x ) noexcept

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-identifier-length ⚠️
parameter name x is too short, expected at least 2 characters

return __builtin_bswap16( x );
}

inline std::uint32_t byteswap( std::uint32_t x ) noexcept

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-identifier-length ⚠️
parameter name x is too short, expected at least 2 characters

return __builtin_bswap32( x );
}

inline std::uint64_t byteswap( std::uint64_t x ) noexcept

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-identifier-length ⚠️
parameter name x is too short, expected at least 2 characters


#if defined(__SIZEOF_INT128__)

inline __uint128_t byteswap( __uint128_t x ) noexcept

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-identifier-length ⚠️
parameter name x is too short, expected at least 2 characters


// load_*_u16

inline std::uint16_t load_native_u16( void const* p ) noexcept

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-identifier-length ⚠️
parameter name p is too short, expected at least 2 characters

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Clang-Tidy found issue(s) with the introduced code (19/35)


inline std::uint16_t load_native_u16( void const* p ) noexcept
{
std::uint16_t tmp;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ cppcoreguidelines-init-variables ⚠️
variable tmp is not initialized

Suggested change
std::uint16_t tmp;
std::uint16_t tmp = 0;

return tmp;
}

inline std::uint16_t load_little_u16( void const* p ) noexcept

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-identifier-length ⚠️
parameter name p is too short, expected at least 2 characters


inline std::uint16_t load_little_u16( void const* p ) noexcept
{
std::uint16_t tmp;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ cppcoreguidelines-init-variables ⚠️
variable tmp is not initialized

Suggested change
std::uint16_t tmp;
std::uint16_t tmp = 0;

#endif
}

inline std::uint16_t load_big_u16( void const* p ) noexcept

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-identifier-length ⚠️
parameter name p is too short, expected at least 2 characters


inline std::uint16_t load_big_u16( void const* p ) noexcept
{
std::uint16_t tmp;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ cppcoreguidelines-init-variables ⚠️
variable tmp is not initialized

Suggested change
std::uint16_t tmp;
std::uint16_t tmp = 0;


// load_*_u32

inline std::uint32_t load_native_u32( void const* p ) noexcept

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-identifier-length ⚠️
parameter name p is too short, expected at least 2 characters


inline std::uint32_t load_native_u32( void const* p ) noexcept
{
std::uint32_t tmp;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ cppcoreguidelines-init-variables ⚠️
variable tmp is not initialized

Suggested change
std::uint32_t tmp;
std::uint32_t tmp = 0;

return tmp;
}

inline std::uint32_t load_little_u32( void const* p ) noexcept

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-identifier-length ⚠️
parameter name p is too short, expected at least 2 characters


inline std::uint32_t load_little_u32( void const* p ) noexcept
{
std::uint32_t tmp;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ cppcoreguidelines-init-variables ⚠️
variable tmp is not initialized

Suggested change
std::uint32_t tmp;
std::uint32_t tmp = 0;

#endif
}

inline std::uint32_t load_big_u32( void const* p ) noexcept

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-identifier-length ⚠️
parameter name p is too short, expected at least 2 characters

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Clang-Tidy found issue(s) with the introduced code (20/35)


inline std::uint32_t load_big_u32( void const* p ) noexcept
{
std::uint32_t tmp;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ cppcoreguidelines-init-variables ⚠️
variable tmp is not initialized

Suggested change
std::uint32_t tmp;
std::uint32_t tmp = 0;


// load_*_u64

inline std::uint64_t load_native_u64( void const* p ) noexcept

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-identifier-length ⚠️
parameter name p is too short, expected at least 2 characters


inline std::uint64_t load_native_u64( void const* p ) noexcept
{
std::uint64_t tmp;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ cppcoreguidelines-init-variables ⚠️
variable tmp is not initialized

Suggested change
std::uint64_t tmp;
std::uint64_t tmp = 0;

return tmp;
}

inline std::uint64_t load_little_u64( void const* p ) noexcept

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-identifier-length ⚠️
parameter name p is too short, expected at least 2 characters


inline std::uint64_t load_little_u64( void const* p ) noexcept
{
std::uint64_t tmp;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ cppcoreguidelines-init-variables ⚠️
variable tmp is not initialized

Suggested change
std::uint64_t tmp;
std::uint64_t tmp = 0;

#endif
}

inline std::uint64_t load_big_u64( void const* p ) noexcept

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-identifier-length ⚠️
parameter name p is too short, expected at least 2 characters


inline std::uint64_t load_big_u64( void const* p ) noexcept
{
std::uint64_t tmp;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ cppcoreguidelines-init-variables ⚠️
variable tmp is not initialized

Suggested change
std::uint64_t tmp;
std::uint64_t tmp = 0;


#if defined(__SIZEOF_INT128__)

inline __uint128_t load_native_u128( void const* p ) noexcept

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-identifier-length ⚠️
parameter name p is too short, expected at least 2 characters


inline __uint128_t load_native_u128( void const* p ) noexcept
{
__uint128_t tmp;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ cppcoreguidelines-init-variables ⚠️
variable tmp is not initialized

Suggested change
__uint128_t tmp;
__uint128_t tmp = 0;

return tmp;
}

inline __uint128_t load_little_u128( void const* p ) noexcept

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-identifier-length ⚠️
parameter name p is too short, expected at least 2 characters

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Clang-Tidy found issue(s) with the introduced code (21/35)


inline __uint128_t load_little_u128( void const* p ) noexcept
{
__uint128_t tmp;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ cppcoreguidelines-init-variables ⚠️
variable tmp is not initialized

Suggested change
__uint128_t tmp;
__uint128_t tmp = 0;

#endif
}

inline __uint128_t load_big_u128( void const* p ) noexcept

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-identifier-length ⚠️
parameter name p is too short, expected at least 2 characters


inline __uint128_t load_big_u128( void const* p ) noexcept
{
__uint128_t tmp;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ cppcoreguidelines-init-variables ⚠️
variable tmp is not initialized

Suggested change
__uint128_t tmp;
__uint128_t tmp = 0;


// store_*_u16

inline void store_native_u16( void* p, std::uint16_t v ) noexcept

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-identifier-length ⚠️
parameter name p is too short, expected at least 2 characters


// store_*_u16

inline void store_native_u16( void* p, std::uint16_t v ) noexcept

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-identifier-length ⚠️
parameter name v is too short, expected at least 2 characters

std::memcpy( p, &v, sizeof( v ) );
}

inline void store_little_u16( void* p, std::uint16_t v ) noexcept

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-identifier-length ⚠️
parameter name p is too short, expected at least 2 characters

std::memcpy( p, &v, sizeof( v ) );
}

inline void store_little_u16( void* p, std::uint16_t v ) noexcept

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-identifier-length ⚠️
parameter name v is too short, expected at least 2 characters

std::memcpy( p, &v, sizeof( v ) );
}

inline void store_big_u16( void* p, std::uint16_t v ) noexcept

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-identifier-length ⚠️
parameter name p is too short, expected at least 2 characters

std::memcpy( p, &v, sizeof( v ) );
}

inline void store_big_u16( void* p, std::uint16_t v ) noexcept

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-identifier-length ⚠️
parameter name v is too short, expected at least 2 characters


// store_*_u32

inline void store_native_u32( void* p, std::uint32_t v ) noexcept

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-identifier-length ⚠️
parameter name p is too short, expected at least 2 characters

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Clang-Tidy found issue(s) with the introduced code (22/35)


// store_*_u32

inline void store_native_u32( void* p, std::uint32_t v ) noexcept

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-identifier-length ⚠️
parameter name v is too short, expected at least 2 characters

std::memcpy( p, &v, sizeof( v ) );
}

inline void store_little_u32( void* p, std::uint32_t v ) noexcept

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-identifier-length ⚠️
parameter name p is too short, expected at least 2 characters

std::memcpy( p, &v, sizeof( v ) );
}

inline void store_little_u32( void* p, std::uint32_t v ) noexcept

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-identifier-length ⚠️
parameter name v is too short, expected at least 2 characters

std::memcpy( p, &v, sizeof( v ) );
}

inline void store_big_u32( void* p, std::uint32_t v ) noexcept

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-identifier-length ⚠️
parameter name p is too short, expected at least 2 characters

std::memcpy( p, &v, sizeof( v ) );
}

inline void store_big_u32( void* p, std::uint32_t v ) noexcept

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-identifier-length ⚠️
parameter name v is too short, expected at least 2 characters


// store_*_u64

inline void store_native_u64( void* p, std::uint64_t v ) noexcept

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-identifier-length ⚠️
parameter name p is too short, expected at least 2 characters


// store_*_u64

inline void store_native_u64( void* p, std::uint64_t v ) noexcept

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-identifier-length ⚠️
parameter name v is too short, expected at least 2 characters

std::memcpy( p, &v, sizeof( v ) );
}

inline void store_little_u64( void* p, std::uint64_t v ) noexcept

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-identifier-length ⚠️
parameter name p is too short, expected at least 2 characters

std::memcpy( p, &v, sizeof( v ) );
}

inline void store_little_u64( void* p, std::uint64_t v ) noexcept

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-identifier-length ⚠️
parameter name v is too short, expected at least 2 characters

std::memcpy( p, &v, sizeof( v ) );
}

inline void store_big_u64( void* p, std::uint64_t v ) noexcept

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-identifier-length ⚠️
parameter name p is too short, expected at least 2 characters

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Clang-Tidy found issue(s) with the introduced code (23/35)

std::memcpy( p, &v, sizeof( v ) );
}

inline void store_big_u64( void* p, std::uint64_t v ) noexcept

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-identifier-length ⚠️
parameter name v is too short, expected at least 2 characters


#if defined(__SIZEOF_INT128__)

inline void store_native_u128( void* p, __uint128_t v ) noexcept

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-identifier-length ⚠️
parameter name p is too short, expected at least 2 characters


#if defined(__SIZEOF_INT128__)

inline void store_native_u128( void* p, __uint128_t v ) noexcept

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-identifier-length ⚠️
parameter name v is too short, expected at least 2 characters

std::memcpy( p, &v, sizeof( v ) );
}

inline void store_little_u128( void* p, __uint128_t v ) noexcept

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-identifier-length ⚠️
parameter name p is too short, expected at least 2 characters

std::memcpy( p, &v, sizeof( v ) );
}

inline void store_little_u128( void* p, __uint128_t v ) noexcept

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-identifier-length ⚠️
parameter name v is too short, expected at least 2 characters

std::memcpy( p, &v, sizeof( v ) );
}

inline void store_big_u128( void* p, __uint128_t v ) noexcept

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-identifier-length ⚠️
parameter name p is too short, expected at least 2 characters

std::memcpy( p, &v, sizeof( v ) );
}

inline void store_big_u128( void* p, __uint128_t v ) noexcept

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-identifier-length ⚠️
parameter name v is too short, expected at least 2 characters


#endif

} // detail

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ google-readability-namespace-comments ⚠️
namespace detail ends with an unrecognized comment

#endif

} // detail
} // uuids

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ google-readability-namespace-comments ⚠️
namespace uuids ends with an unrecognized comment


} // detail
} // uuids
} // boost

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ google-readability-namespace-comments ⚠️
namespace boost ends with an unrecognized comment

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Clang-Tidy found issue(s) with the introduced code (24/35)

// accompanying file LICENSE_1_0.txt or copy at
// https://www.boost.org/LICENSE_1_0.txt)

#include <boost/uuid/detail/endian.hpp>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ clang-diagnostic-error ⚠️
boost/uuid/detail/endian.hpp file not found

BOOST_UUID_STATIC_ASSERT(sizeof(unsigned char)*8 == 8);
BOOST_UUID_STATIC_ASSERT(sizeof(unsigned int)*8 == 32);

inline unsigned int left_rotate(unsigned int x, std::size_t n)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-identifier-length ⚠️
parameter name x is too short, expected at least 2 characters


typedef unsigned char digest_type[ 20 ];

public:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-redundant-access-specifiers ⚠️
redundant access specifier has the same accessibility as the previous access specifier

Suggested change
public:

void process_block();
void process_byte_impl(unsigned char byte);

private:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-redundant-access-specifiers ⚠️
redundant access specifier has the same accessibility as the previous access specifier

Suggested change
private:


private:

unsigned int h_[5];

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ cppcoreguidelines-pro-type-member-init ⚠️
constructor does not initialize these fields: h_, block_, block_byte_index_, bit_count_low, bit_count_high

Suggested change
unsigned int h_[5];
unsigned int h_[5]{};


unsigned int h_[5];

unsigned char block_[64];

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ cppcoreguidelines-pro-type-member-init ⚠️
constructor does not initialize these fields: h_, block_, block_byte_index_, bit_count_low, bit_count_high

Suggested change
unsigned char block_[64];
unsigned char block_[64]{};

Comment on lines +58 to +60
std::size_t block_byte_index_;
std::size_t bit_count_low;
std::size_t bit_count_high;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ cppcoreguidelines-pro-type-member-init ⚠️
constructor does not initialize these fields: h_, block_, block_byte_index_, bit_count_low, bit_count_high

Suggested change
std::size_t block_byte_index_;
std::size_t bit_count_low;
std::size_t bit_count_high;
std::size_t block_byte_index_{};
std::size_t bit_count_low{};
std::size_t bit_count_high{};


inline void sha1::process_bytes(void const* buffer, std::size_t byte_count)
{
unsigned char const* b = static_cast<unsigned char const*>(buffer);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-identifier-length ⚠️
variable name b is too short, expected at least 2 characters


inline void sha1::process_block()
{
unsigned int w[80];

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-identifier-length ⚠️
variable name w is too short, expected at least 2 characters

w[i] = left_rotate((w[i-3] ^ w[i-8] ^ w[i-14] ^ w[i-16]), 1);
}

unsigned int a = h_[0];

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-identifier-length ⚠️
variable name a is too short, expected at least 2 characters

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Clang-Tidy found issue(s) with the introduced code (25/35)

}

unsigned int a = h_[0];
unsigned int b = h_[1];

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-identifier-length ⚠️
variable name b is too short, expected at least 2 characters


unsigned int a = h_[0];
unsigned int b = h_[1];
unsigned int c = h_[2];

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-identifier-length ⚠️
variable name c is too short, expected at least 2 characters

unsigned int a = h_[0];
unsigned int b = h_[1];
unsigned int c = h_[2];
unsigned int d = h_[3];

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-identifier-length ⚠️
variable name d is too short, expected at least 2 characters

unsigned int b = h_[1];
unsigned int c = h_[2];
unsigned int d = h_[3];
unsigned int e = h_[4];

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-identifier-length ⚠️
variable name e is too short, expected at least 2 characters

unsigned int e = h_[4];

for (std::size_t i=0; i<80; ++i) {
unsigned int f;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ cppcoreguidelines-init-variables ⚠️
variable f is not initialized

Suggested change
unsigned int f;
unsigned int f = 0;

unsigned int e = h_[4];

for (std::size_t i=0; i<80; ++i) {
unsigned int f;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-identifier-length ⚠️
variable name f is too short, expected at least 2 characters


for (std::size_t i=0; i<80; ++i) {
unsigned int f;
unsigned int k;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ cppcoreguidelines-init-variables ⚠️
variable k is not initialized

Suggested change
unsigned int k;
unsigned int k = 0;


for (std::size_t i=0; i<80; ++i) {
unsigned int f;
unsigned int k;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-identifier-length ⚠️
variable name k is too short, expected at least 2 characters

detail::store_big_u32( digest + 16, h_[4] );
}

}}} // namespace boost::uuids::detail

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ google-readability-namespace-comments ⚠️
namespace detail not terminated with a closing comment

detail::store_big_u32( digest + 16, h_[4] );
}

}}} // namespace boost::uuids::detail

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ google-readability-namespace-comments ⚠️
namespace uuids not terminated with a closing comment

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Clang-Tidy found issue(s) with the introduced code (26/35)

detail::store_big_u32( digest + 16, h_[4] );
}

}}} // namespace boost::uuids::detail

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ google-readability-namespace-comments ⚠️
namespace boost ends with a comment that refers to a wrong namespace boost::uuids::detail

// Distributed under the Boost Software License, Version 1.0.
// https://www.boost.org/LICENSE_1_0.txt

#include <boost/uuid/detail/random_device.hpp>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ clang-diagnostic-error ⚠️
boost/uuid/detail/random_device.hpp file not found

{
private:

detail::random_device dev_;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ cppcoreguidelines-pro-type-member-init ⚠️
constructor does not initialize these fields: dev_

Suggested change
detail::random_device dev_;
detail::random_device dev_{};

}
}

const char * name() const

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-convert-member-functions-to-static ⚠️
method name can be made static

Suggested change
const char * name() const
static const char * name()

}
};

} // detail

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ google-readability-namespace-comments ⚠️
namespace detail ends with an unrecognized comment

};

} // detail
} // uuids

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ google-readability-namespace-comments ⚠️
namespace uuids ends with an unrecognized comment


} // detail
} // uuids
} // boost

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ google-readability-namespace-comments ⚠️
namespace boost ends with an unrecognized comment

// Distributed under the Boost Software License, Version 1.0.
// https://www.boost.org/LICENSE_1_0.txt

#include <boost/uuid/uuid.hpp>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ clang-diagnostic-error ⚠️
boost/uuid/uuid.hpp file not found


#endif

template<class Ch> inline Ch* to_chars( uuid const& u, Ch* out ) noexcept

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ misc-unused-parameters ⚠️
parameter u is unused

Suggested change
template<class Ch> inline Ch* to_chars( uuid const& u, Ch* out ) noexcept
template<class Ch> inline Ch* to_chars( uuid const& /*u*/, Ch* out ) noexcept


#endif

template<class Ch> inline Ch* to_chars( uuid const& u, Ch* out ) noexcept

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-identifier-length ⚠️
parameter name u is too short, expected at least 2 characters

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Clang-Tidy found issue(s) with the introduced code (27/35)


template<class Ch> inline Ch* to_chars( uuid const& u, Ch* out ) noexcept
{
constexpr Ch const* p = digits( static_cast<Ch const*>( nullptr ) );

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-identifier-length ⚠️
variable name p is too short, expected at least 2 characters

}

} // namespace detail
}} //namespace boost::uuids

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ google-readability-namespace-comments ⚠️
namespace uuids not terminated with a closing comment

}

} // namespace detail
}} //namespace boost::uuids

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ google-readability-namespace-comments ⚠️
namespace boost ends with a comment that refers to a wrong namespace boost::uuids

// accompanying file LICENSE_1_0.txt or copy at
// https://www.boost.org/LICENSE_1_0.txt)

#include <boost/uuid/name_generator_md5.hpp>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ clang-diagnostic-error ⚠️
boost/uuid/name_generator_md5.hpp file not found

// Only provided for compatibility with 1.85 and earlier
using name_generator_latest = name_generator_sha1;

} // uuids

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ llvm-namespace-comment ⚠️
namespace uuids ends with an unrecognized comment

Suggested change
} // uuids
} // namespace uuids

using name_generator_latest = name_generator_sha1;

} // uuids
} // boost

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ google-readability-namespace-comments ⚠️
namespace boost ends with an unrecognized comment


// prospector -p mul,xorr -t 1000
// score = 592.20293470138972
inline std::uint64_t hash_mix_mx( std::uint64_t x ) noexcept

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-identifier-length ⚠️
parameter name x is too short, expected at least 2 characters

// prospector -p mul:0xD96AAA55,xorr:16,mul,xorr -t 1000
// score = 79.5223047689704
// (with mx prepended)
inline std::uint64_t hash_mix_fmx( std::uint64_t x ) noexcept

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-identifier-length ⚠️
parameter name x is too short, expected at least 2 characters

return x;
}

} // detail

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ google-readability-namespace-comments ⚠️
namespace detail ends with an unrecognized comment

}

} // detail
} // uuids

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ google-readability-namespace-comments ⚠️
namespace uuids ends with an unrecognized comment

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Clang-Tidy found issue(s) with the introduced code (28/35)


} // detail
} // uuids
} // boost

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ google-readability-namespace-comments ⚠️
namespace boost ends with an unrecognized comment

// Distributed under the Boost Software License, Version 1.0.
// https://www.boost.org/LICENSE_1_0.txt

#include <boost/uuid/detail/basic_name_generator.hpp>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ clang-diagnostic-error ⚠️
boost/uuid/detail/basic_name_generator.hpp file not found

}
};

} // uuids

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ google-readability-namespace-comments ⚠️
namespace uuids ends with an unrecognized comment

};

} // uuids
} // boost

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ google-readability-namespace-comments ⚠️
namespace boost ends with an unrecognized comment

// Distributed under the Boost Software License, Version 1.0.
// https://www.boost.org/LICENSE_1_0.txt

#include <boost/uuid/time_generator_v1.hpp>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ clang-diagnostic-error ⚠️
boost/uuid/time_generator_v1.hpp file not found


inline time_generator_v6::result_type time_generator_v6::operator()() noexcept
{
uuid result = time_generator_v1::operator()();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ cppcoreguidelines-init-variables ⚠️
variable result is not initialized

Suggested change
uuid result = time_generator_v1::operator()();
uuid result = 0 = time_generator_v1::operator()();

{
uuid result = time_generator_v1::operator()();

std::uint64_t timestamp = result.timestamp_v1();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ cppcoreguidelines-init-variables ⚠️
variable timestamp is not initialized

Suggested change
std::uint64_t timestamp = result.timestamp_v1();
std::uint64_t timestamp = 0 = result.timestamp_v1();


std::uint64_t timestamp = result.timestamp_v1();

std::uint32_t time_high = static_cast< std::uint32_t >( timestamp >> 28 );

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ cppcoreguidelines-init-variables ⚠️
variable time_high is not initialized

Suggested change
std::uint32_t time_high = static_cast< std::uint32_t >( timestamp >> 28 );
std::uint32_t time_high = 0 = static_cast< std::uint32_t >( timestamp >> 28 );


detail::store_big_u32( result.data + 0, time_high );

std::uint16_t time_mid = static_cast< std::uint16_t >( timestamp >> 12 );

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ cppcoreguidelines-init-variables ⚠️
variable time_mid is not initialized

Suggested change
std::uint16_t time_mid = static_cast< std::uint16_t >( timestamp >> 12 );
std::uint16_t time_mid = 0 = static_cast< std::uint16_t >( timestamp >> 12 );


detail::store_big_u16( result.data + 4, time_mid );

std::uint16_t time_low_and_version = static_cast< std::uint16_t >( timestamp & 0xFFF ) | 0x6000;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ cppcoreguidelines-init-variables ⚠️
variable time_low_and_version is not initialized

Suggested change
std::uint16_t time_low_and_version = static_cast< std::uint16_t >( timestamp & 0xFFF ) | 0x6000;
std::uint16_t time_low_and_version = 0 = static_cast< std::uint16_t >( timestamp & 0xFFF ) | 0x6000;

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Clang-Tidy found issue(s) with the introduced code (29/35)

return result;
}

}} // namespace boost::uuids

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ google-readability-namespace-comments ⚠️
namespace uuids not terminated with a closing comment

return result;
}

}} // namespace boost::uuids

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ google-readability-namespace-comments ⚠️
namespace boost ends with a comment that refers to a wrong namespace boost::uuids

return tp.time_since_epoch().count();
}

} // uuids

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ google-readability-namespace-comments ⚠️
namespace uuids ends with an unrecognized comment

}

} // uuids
} // boost

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ google-readability-namespace-comments ⚠️
namespace boost ends with an unrecognized comment

// accompanying file LICENSE_1_0.txt or copy at
// https://www.boost.org/LICENSE_1_0.txt)

#include <boost/uuid/detail/numeric_cast.hpp>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ clang-diagnostic-error ⚠️
boost/uuid/detail/numeric_cast.hpp file not found

/*
* The MD5 transformation for all four rounds.
*/
#define BOOST_UUID_DETAIL_MD5_STEP(f, a, b, c, d, x, t, s) \

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ cppcoreguidelines-macro-usage ⚠️
function-like macro BOOST_UUID_DETAIL_MD5_STEP used; consider a constexpr template function

* their own translation unit avoids the problem.
*/
#if defined(__i386__) || defined(__x86_64__) || defined(__vax__)
#define BOOST_UUID_DETAIL_MD5_SET(n) \

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ cppcoreguidelines-macro-usage ⚠️
function-like macro BOOST_UUID_DETAIL_MD5_SET used; consider a constexpr template function

#if defined(__i386__) || defined(__x86_64__) || defined(__vax__)
#define BOOST_UUID_DETAIL_MD5_SET(n) \
(memcpy(&ctx->block[(n)], &ptr[(n) * 4], sizeof(MD5_u32plus)), (ctx->block[(n)]))
#define BOOST_UUID_DETAIL_MD5_GET(n) \

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ cppcoreguidelines-macro-usage ⚠️
function-like macro BOOST_UUID_DETAIL_MD5_GET used; consider a constexpr template function

memcpy(ctx->buffer, data, size);
}

#define BOOST_UUID_DETAIL_MD5_OUT(dst, src) \

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ cppcoreguidelines-macro-usage ⚠️
function-like macro BOOST_UUID_DETAIL_MD5_OUT used; consider a constexpr template function

};


} // detail

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ google-readability-namespace-comments ⚠️
namespace detail ends with an unrecognized comment

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Clang-Tidy found issue(s) with the introduced code (30/35)



} // detail
} // uuids

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ google-readability-namespace-comments ⚠️
namespace uuids ends with an unrecognized comment


} // detail
} // uuids
} // boost

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ google-readability-namespace-comments ⚠️
namespace boost ends with an unrecognized comment

// Distributed under the Boost Software License, Version 1.0.
// https://www.boost.org/LICENSE_1_0.txt

#include <boost/uuid/uuid_clock.hpp>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ clang-diagnostic-error ⚠️
boost/uuid/uuid_clock.hpp file not found


public:

operator repr_type& () noexcept { return repr_; }

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ google-explicit-constructor ⚠️
operator unsigned char (&)[16] must be marked explicit to avoid unintentional implicit conversions

Suggested change
operator repr_type& () noexcept { return repr_; }
explicit operator repr_type& () noexcept { return repr_; }

public:

operator repr_type& () noexcept { return repr_; }
operator repr_type const& () const noexcept { return repr_; }

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ google-explicit-constructor ⚠️
operator const unsigned char (&)[16] must be marked explicit to avoid unintentional implicit conversions

Suggested change
operator repr_type const& () const noexcept { return repr_; }
explicit operator repr_type const& () const noexcept { return repr_; }


data_type data;

public:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-redundant-access-specifiers ⚠️
redundant access specifier has the same accessibility as the previous access specifier

Suggested change
public:


uuid() = default;

uuid( repr_type const& r )

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ google-explicit-constructor ⚠️
single-argument constructors must be marked explicit to avoid unintentional implicit conversions

Suggested change
uuid( repr_type const& r )
explicit uuid( repr_type const& r )


uuid() = default;

uuid( repr_type const& r )

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-identifier-length ⚠️
parameter name r is too short, expected at least 2 characters


// size

constexpr size_type size() const noexcept { return static_size(); }

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-convert-member-functions-to-static ⚠️
method size can be made static

Suggested change
constexpr size_type size() const noexcept { return static_size(); }
static constexpr size_type size() noexcept { return static_size(); }

unsigned char octet7 = data[8]; // octet 7 is array index 8
if ( (octet7 & 0x80) == 0x00 ) { // 0b0xxxxxxx
return variant_ncs;
} else if ( (octet7 & 0xC0) == 0x80 ) { // 0b10xxxxxx

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ llvm-else-after-return ⚠️
do not use else after return

Suggested change
} else if ( (octet7 & 0xC0) == 0x80 ) { // 0b10xxxxxx
} if ( (octet7 & 0xC0) == 0x80 ) { // 0b10xxxxxx

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Clang-Tidy found issue(s) with the introduced code (31/35)

std::uint8_t octet9 = data[6];
if ( (octet9 & 0xF0) == 0x10 ) {
return version_time_based;
} else if ( (octet9 & 0xF0) == 0x20 ) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ llvm-else-after-return ⚠️
do not use else after return

Suggested change
} else if ( (octet9 & 0xF0) == 0x20 ) {
} if ( (octet9 & 0xF0) == 0x20 ) {


using timestamp_type = std::uint64_t;

timestamp_type timestamp_v1() const noexcept

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-convert-member-functions-to-static ⚠️
method timestamp_v1 can be made static

Suggested change
timestamp_type timestamp_v1() const noexcept
static timestamp_type timestamp_v1() noexcept


timestamp_type timestamp_v1() const noexcept
{
std::uint32_t time_low = detail::load_big_u32( this->data + 0 );

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ cppcoreguidelines-init-variables ⚠️
variable time_low is not initialized

Suggested change
std::uint32_t time_low = detail::load_big_u32( this->data + 0 );
std::uint32_t time_low = 0 = detail::load_big_u32( this->data + 0 );

timestamp_type timestamp_v1() const noexcept
{
std::uint32_t time_low = detail::load_big_u32( this->data + 0 );
std::uint16_t time_mid = detail::load_big_u16( this->data + 4 );

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ cppcoreguidelines-init-variables ⚠️
variable time_mid is not initialized

Suggested change
std::uint16_t time_mid = detail::load_big_u16( this->data + 4 );
std::uint16_t time_mid = 0 = detail::load_big_u16( this->data + 4 );

{
std::uint32_t time_low = detail::load_big_u32( this->data + 0 );
std::uint16_t time_mid = detail::load_big_u16( this->data + 4 );
std::uint16_t time_hi = detail::load_big_u16( this->data + 6 ) & 0x0FFF;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ cppcoreguidelines-init-variables ⚠️
variable time_hi is not initialized

Suggested change
std::uint16_t time_hi = detail::load_big_u16( this->data + 6 ) & 0x0FFF;
std::uint16_t time_hi = 0 = detail::load_big_u16( this->data + 6 ) & 0x0FFF;

return time_low | static_cast<std::uint64_t>( time_mid ) << 32 | static_cast<std::uint64_t>( time_hi ) << 48;
}

timestamp_type timestamp_v6() const noexcept

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-convert-member-functions-to-static ⚠️
method timestamp_v6 can be made static

Suggested change
timestamp_type timestamp_v6() const noexcept
static timestamp_type timestamp_v6() noexcept


timestamp_type timestamp_v6() const noexcept
{
std::uint32_t time_high = detail::load_big_u32( this->data + 0 );

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ cppcoreguidelines-init-variables ⚠️
variable time_high is not initialized

Suggested change
std::uint32_t time_high = detail::load_big_u32( this->data + 0 );
std::uint32_t time_high = 0 = detail::load_big_u32( this->data + 0 );

timestamp_type timestamp_v6() const noexcept
{
std::uint32_t time_high = detail::load_big_u32( this->data + 0 );
std::uint16_t time_mid = detail::load_big_u16( this->data + 4 );

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ cppcoreguidelines-init-variables ⚠️
variable time_mid is not initialized

Suggested change
std::uint16_t time_mid = detail::load_big_u16( this->data + 4 );
std::uint16_t time_mid = 0 = detail::load_big_u16( this->data + 4 );

{
std::uint32_t time_high = detail::load_big_u32( this->data + 0 );
std::uint16_t time_mid = detail::load_big_u16( this->data + 4 );
std::uint16_t time_low = detail::load_big_u16( this->data + 6 ) & 0x0FFF;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ cppcoreguidelines-init-variables ⚠️
variable time_low is not initialized

Suggested change
std::uint16_t time_low = detail::load_big_u16( this->data + 6 ) & 0x0FFF;
std::uint16_t time_low = 0 = detail::load_big_u16( this->data + 6 ) & 0x0FFF;

return time_low | static_cast<std::uint64_t>( time_mid ) << 12 | static_cast<std::uint64_t>( time_high ) << 28;
}

timestamp_type timestamp_v7() const noexcept

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-convert-member-functions-to-static ⚠️
method timestamp_v7 can be made static

Suggested change
timestamp_type timestamp_v7() const noexcept
static timestamp_type timestamp_v7() noexcept

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Clang-Tidy found issue(s) with the introduced code (32/35)


timestamp_type timestamp_v7() const noexcept
{
std::uint64_t time_and_version = detail::load_big_u64( this->data + 0 );

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ cppcoreguidelines-init-variables ⚠️
variable time_and_version is not initialized

Suggested change
std::uint64_t time_and_version = detail::load_big_u64( this->data + 0 );
std::uint64_t time_and_version = 0 = detail::load_big_u64( this->data + 0 );


std::chrono::time_point<std::chrono::system_clock, std::chrono::milliseconds> time_point_v7() const noexcept
{
return std::chrono::time_point<std::chrono::system_clock, std::chrono::milliseconds>( std::chrono::milliseconds( timestamp_v7() ) );

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ google-readability-casting ⚠️
C-style casts are discouraged; use static_cast/const_cast/reinterpret_cast


using node_type = std::array<std::uint8_t, 6>;

node_type node_identifier() const noexcept

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-convert-member-functions-to-static ⚠️
method node_identifier can be made static

Suggested change
node_type node_identifier() const noexcept
static node_type node_identifier() noexcept


// hash_value

inline std::size_t hash_value( uuid const& u ) noexcept

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-identifier-length ⚠️
parameter name u is too short, expected at least 2 characters


inline std::size_t hash_value( uuid const& u ) noexcept
{
std::uint64_t r = 0;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-identifier-length ⚠️
variable name r is too short, expected at least 2 characters

return static_cast<std::size_t>( detail::hash_mix_fmx( r ) );
}

}} //namespace boost::uuids

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ google-readability-namespace-comments ⚠️
namespace uuids not terminated with a closing comment

return static_cast<std::size_t>( detail::hash_mix_fmx( r ) );
}

}} //namespace boost::uuids

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ google-readability-namespace-comments ⚠️
namespace boost ends with a comment that refers to a wrong namespace boost::uuids

namespace uuids {
namespace detail {

using std::random_device;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ misc-unused-using-decls ⚠️
using decl random_device is unused


using std::random_device;

} // detail

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ llvm-namespace-comment ⚠️
namespace detail ends with an unrecognized comment

Suggested change
} // detail
} // namespace detail

using std::random_device;

} // detail
} // uuids

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ llvm-namespace-comment ⚠️
namespace uuids ends with an unrecognized comment

Suggested change
} // uuids
} // namespace uuids

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Clang-Tidy found issue(s) with the introduced code (33/35)


} // detail
} // uuids
} // boost

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ llvm-namespace-comment ⚠️
namespace boost ends with an unrecognized comment

Suggested change
} // boost
} // namespace boost

// accompanying file LICENSE_1_0.txt or copy at
// https://www.boost.org/LICENSE_1_0.txt)

#include <boost/uuid/nil_generator.hpp>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ clang-diagnostic-error ⚠️
boost/uuid/nil_generator.hpp file not found

// Distributed under the Boost Software License, Version 1.0.
// https://www.boost.org/LICENSE_1_0.txt

#include <boost/uuid/uuid.hpp>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ clang-diagnostic-error ⚠️
boost/uuid/uuid.hpp file not found


inline time_generator_v1::time_generator_v1()
{
detail::random_provider prov;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ cppcoreguidelines-init-variables ⚠️
variable prov is not initialized

Suggested change
detail::random_provider prov;
detail::random_provider prov = 0;

state_.clock_seq = static_cast<std::uint16_t>( tmp[ 2 ] & 0x3FFF );
}

inline time_generator_v1::time_generator_v1( uuid::node_type const& node, state_type const& state ) noexcept: node_( node ), state_( state )

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ misc-unused-parameters ⚠️
parameter node is unused

Suggested change
inline time_generator_v1::time_generator_v1( uuid::node_type const& node, state_type const& state ) noexcept: node_( node ), state_( state )
inline time_generator_v1::time_generator_v1( uuid::node_type const& /*node*/, state_type const& state ) noexcept: node_( node ), state_( state )

{
}

inline time_generator_v1::time_generator_v1( uuid::node_type const& node, std::atomic<state_type>& state ) noexcept: node_( node ), ps_( &state )

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ misc-unused-parameters ⚠️
parameter node is unused

Suggested change
inline time_generator_v1::time_generator_v1( uuid::node_type const& node, std::atomic<state_type>& state ) noexcept: node_( node ), ps_( &state )
inline time_generator_v1::time_generator_v1( uuid::node_type const& /*node*/, std::atomic<state_type>& state ) noexcept: node_( node ), ps_( &state )

{
state_type newst( oldst );

std::uint64_t timestamp = uuid_clock::now().time_since_epoch().count();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ cppcoreguidelines-init-variables ⚠️
variable timestamp is not initialized

Suggested change
std::uint64_t timestamp = uuid_clock::now().time_since_epoch().count();
std::uint64_t timestamp = 0 = uuid_clock::now().time_since_epoch().count();


inline time_generator_v1::result_type time_generator_v1::operator()() noexcept
{
if( ps_ )

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-implicit-bool-conversion ⚠️
implicit conversion std::atomic<state_type> * -> bool

Suggested change
if( ps_ )
if( ps_ != nullptr )

state_ = get_new_state( state_ );
}

uuid result;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ cppcoreguidelines-init-variables ⚠️
variable result is not initialized

Suggested change
uuid result;
uuid result = 0;

return result;
}

}} // namespace boost::uuids

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ google-readability-namespace-comments ⚠️
namespace uuids not terminated with a closing comment

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Clang-Tidy found issue(s) with the introduced code (34/35)

return result;
}

}} // namespace boost::uuids

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ google-readability-namespace-comments ⚠️
namespace boost ends with a comment that refers to a wrong namespace boost::uuids

// This header is only provided for compatibility with
// Boost release 1.85 and earlier.

#include <boost/uuid/detail/basic_name_generator.hpp>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ clang-diagnostic-error ⚠️
boost/uuid/detail/basic_name_generator.hpp file not found

// Only provided for compatibility with 1.85
using detail::basic_name_generator;

} // uuids

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ llvm-namespace-comment ⚠️
namespace uuids ends with an unrecognized comment

Suggested change
} // uuids
} // namespace uuids

using detail::basic_name_generator;

} // uuids
} // boost

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ llvm-namespace-comment ⚠️
namespace boost ends with an unrecognized comment

Suggested change
} // boost
} // namespace boost

std::uint32_t block_[ 16 ];
std::size_t index_;

private:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-redundant-access-specifiers ⚠️
redundant access specifier has the same accessibility as the previous access specifier

Suggested change
private:


private:

static inline std::uint32_t rotl( std::uint32_t x, int n ) noexcept

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-identifier-length ⚠️
parameter name x is too short, expected at least 2 characters

return ( x << n ) | ( x >> (32 - n) );
}

static inline void quarter_round( std::uint32_t (&x)[ 16 ], int a, int b, int c, int d ) noexcept

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-identifier-length ⚠️
parameter name x is too short, expected at least 2 characters

return ( x << n ) | ( x >> (32 - n) );
}

static inline void quarter_round( std::uint32_t (&x)[ 16 ], int a, int b, int c, int d ) noexcept

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-identifier-length ⚠️
parameter name a is too short, expected at least 2 characters

return ( x << n ) | ( x >> (32 - n) );
}

static inline void quarter_round( std::uint32_t (&x)[ 16 ], int a, int b, int c, int d ) noexcept

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-identifier-length ⚠️
parameter name b is too short, expected at least 2 characters

return ( x << n ) | ( x >> (32 - n) );
}

static inline void quarter_round( std::uint32_t (&x)[ 16 ], int a, int b, int c, int d ) noexcept

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-identifier-length ⚠️
parameter name c is too short, expected at least 2 characters

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Clang-Tidy found issue(s) with the introduced code (35/35)

return ( x << n ) | ( x >> (32 - n) );
}

static inline void quarter_round( std::uint32_t (&x)[ 16 ], int a, int b, int c, int d ) noexcept

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-identifier-length ⚠️
parameter name d is too short, expected at least 2 characters

Comment on lines +20 to +21
std::uint32_t state_[ 16 ];
std::uint32_t block_[ 16 ];

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ cppcoreguidelines-pro-type-member-init ⚠️
constructor does not initialize these fields: state_, block_

Suggested change
std::uint32_t state_[ 16 ];
std::uint32_t block_[ 16 ];
std::uint32_t state_[ 16 ]{};
std::uint32_t block_[ 16 ]{};

}
}

chacha20_12( std::uint32_t const (&key)[ 8 ], std::uint32_t const (&nonce)[ 2 ] ) noexcept: index_( 16 )

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ cppcoreguidelines-pro-type-member-init ⚠️
constructor does not initialize these fields: state_, block_

}
};

}}} // namespace boost::uuids::detail

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ google-readability-namespace-comments ⚠️
namespace detail not terminated with a closing comment

}
};

}}} // namespace boost::uuids::detail

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ google-readability-namespace-comments ⚠️
namespace uuids not terminated with a closing comment

}
};

}}} // namespace boost::uuids::detail

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ google-readability-namespace-comments ⚠️
namespace boost ends with a comment that refers to a wrong namespace boost::uuids::detail

// Entropy error class
//

#include <boost/config.hpp>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ clang-diagnostic-error ⚠️
boost/config.hpp file not found

std::intmax_t m_errcode;
};

} // uuids

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ google-readability-namespace-comments ⚠️
namespace uuids ends with an unrecognized comment

};

} // uuids
} // boost

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ google-readability-namespace-comments ⚠️
namespace boost ends with an unrecognized comment

// Distributed under the Boost Software License, Version 1.0.
// https://www.boost.org/LICENSE_1_0.txt

#define BOOST_UUID_STATIC_ASSERT(...) static_assert(__VA_ARGS__, #__VA_ARGS__)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ cppcoreguidelines-macro-usage ⚠️
variadic macro BOOST_UUID_STATIC_ASSERT used; consider using a constexpr variadic template function

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