Skip to content

Commit cf16c25

Browse files
fix(clang-tidy): fix issues it found in CI
Curiously, the changed includes seem to allow `clang-tidy` to see issues that it previously didn't see. This commit fixes them. Signed-off-by: Ingo Müller <ingomueller@google.com>
1 parent cd467ac commit cf16c25

5 files changed

Lines changed: 10 additions & 10 deletions

File tree

include/substrait/common/Exceptions.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ inline constexpr const char* kNotImplemented = "NOT_IMPLEMENTED";
3636

3737
class SubstraitException : public std::exception {
3838
public:
39-
enum class Type {
39+
enum class Type : int8_t {
4040
// Errors where the root cause of the problem is either because of bad input
4141
// or an unsupported pattern of use are classified with USER. Examples
4242
// of errors in this category include syntax errors, unavailable names or

include/substrait/common/Io.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ namespace io::substrait {
1515
/*
1616
* \brief The four different ways plans can be represented on disk.
1717
*/
18-
enum class PlanFileFormat {
18+
enum class PlanFileFormat : int8_t {
1919
kBinary = 0,
2020
kJson = 1,
2121
kProtoText = 2,

include/substrait/expression/DecimalLiteral.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#include <utility>
88

99
namespace substrait::proto {
10-
class Expression_Literal_Decimal;
10+
class Expression_Literal_Decimal; // NOLINT
1111
}
1212

1313
namespace io::substrait::expression {

src/substrait/textplan/Location.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77

88
namespace std {
99
template <typename>
10-
struct less;
10+
struct less; // NOLINT
1111
template <typename>
12-
struct hash;
12+
struct hash; // NOLINT
1313
} // namespace std
1414

1515
namespace antlr4 {

src/substrait/textplan/SymbolTable.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
namespace io::substrait::textplan {
2121

22-
enum class SymbolType {
22+
enum class SymbolType : int8_t {
2323
kExtensionSpace = 0,
2424
kFunction = 1,
2525
kPlanRelation = 2,
@@ -36,7 +36,7 @@ enum class SymbolType {
3636
kUnknown = -1,
3737
};
3838

39-
enum class RelationType {
39+
enum class RelationType : int8_t {
4040
// Logical
4141
kUnknown = 0,
4242
kRead = 1,
@@ -64,12 +64,12 @@ enum class RelationType {
6464
kExtensionMulti = 102,
6565
};
6666

67-
enum class RelationDetailType {
67+
enum class RelationDetailType : int8_t {
6868
kUnknown = 0,
6969
kExpression = 1,
7070
};
7171

72-
enum class SourceType {
72+
enum class SourceType : int8_t {
7373
kUnknown = 0,
7474
kLocalFiles = 1,
7575
kNamedTable = 2,
@@ -81,7 +81,7 @@ const std::string& symbolTypeName(SymbolType type);
8181

8282
struct SymbolInfo {
8383
std::string name;
84-
std::string alias{}; // If present, use this instead of name.
84+
std::string alias; // If present, use this instead of name.
8585
const SymbolInfo* schema{nullptr}; // The related schema symbol if present.
8686
Location sourceLocation;
8787
Location permanentLocation{Location::kUnknownLocation};

0 commit comments

Comments
 (0)