Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
# Linting config files symlinked from dev-utils
/.clang-format
/.clang-tidy

# Build related directories
.task/
build/
2 changes: 1 addition & 1 deletion lint-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
clang-format>=20.1
clang-tidy>=20.1
clang-tidy>=21.1
gersemi>=0.16.2
yamllint>=1.35.1
8 changes: 2 additions & 6 deletions src/.clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ IncludeCategories:

# Project library headers
- Regex: "^<log_surgeon"
Priority: 3
Priority: 4

# External library headers. Update when adding new libraries.
- Regex: "^<(fmt|gsl)"
Priority: 4
Priority: 3

# C system headers
- Regex: "^<.+\\.h>"
Expand All @@ -19,7 +19,3 @@ IncludeCategories:
# C++ standard libraries
- Regex: "^<.+>"
Priority: 2

# Project relative headers
- Regex: "^\".+\""
Priority: 5
7 changes: 4 additions & 3 deletions src/log_surgeon/SchemaParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
#include <log_surgeon/utils.hpp>

using ParserValueRegex = log_surgeon::ParserValue<std::unique_ptr<
log_surgeon::finite_automata::RegexAST<log_surgeon::finite_automata::ByteNfaState>>>;
log_surgeon::finite_automata::RegexAST<log_surgeon::finite_automata::ByteNfaState>
>>;
using RegexASTByte
= log_surgeon::finite_automata::RegexAST<log_surgeon::finite_automata::ByteNfaState>;
using RegexASTGroupByte
Expand All @@ -32,8 +33,8 @@ using RegexASTIntegerByte
= log_surgeon::finite_automata::RegexASTInteger<log_surgeon::finite_automata::ByteNfaState>;
using RegexASTLiteralByte
= log_surgeon::finite_automata::RegexASTLiteral<log_surgeon::finite_automata::ByteNfaState>;
using RegexASTMultiplicationByte = log_surgeon::finite_automata::RegexASTMultiplication<
log_surgeon::finite_automata::ByteNfaState>;
using RegexASTMultiplicationByte = log_surgeon::finite_automata::
RegexASTMultiplication<log_surgeon::finite_automata::ByteNfaState>;
using RegexASTOrByte
= log_surgeon::finite_automata::RegexASTOr<log_surgeon::finite_automata::ByteNfaState>;
using RegexASTCatByte
Expand Down
6 changes: 3 additions & 3 deletions src/log_surgeon/finite_automata/Dfa.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
#include <utility>
#include <vector>

#include <fmt/format.h>
#include <fmt/ranges.h>

#include <log_surgeon/Constants.hpp>
#include <log_surgeon/finite_automata/DeterminizationConfiguration.hpp>
#include <log_surgeon/finite_automata/DfaStatePair.hpp>
Expand All @@ -25,9 +28,6 @@
#include <log_surgeon/finite_automata/TagOperation.hpp>
#include <log_surgeon/Token.hpp>

#include <fmt/format.h>
#include <fmt/ranges.h>

namespace log_surgeon::finite_automata {
/**
* Represents a Deterministic Finite Automaton (DFA).
Expand Down
6 changes: 3 additions & 3 deletions src/log_surgeon/finite_automata/DfaState.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@
#include <unordered_map>
#include <vector>

#include <fmt/format.h>
#include <fmt/ranges.h>

#include <log_surgeon/Constants.hpp>
#include <log_surgeon/finite_automata/DfaTransition.hpp>
#include <log_surgeon/finite_automata/RegisterOperation.hpp>
#include <log_surgeon/finite_automata/StateType.hpp>
#include <log_surgeon/finite_automata/UnicodeIntervalTree.hpp>

#include <fmt/format.h>
#include <fmt/ranges.h>

namespace log_surgeon::finite_automata {
template <StateType state_type>
class DfaState;
Expand Down
6 changes: 3 additions & 3 deletions src/log_surgeon/finite_automata/DfaTransition.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
#include <utility>
#include <vector>

#include <log_surgeon/finite_automata/RegisterOperation.hpp>
#include <log_surgeon/finite_automata/StateType.hpp>

#include <fmt/format.h>
#include <fmt/ranges.h>

#include <log_surgeon/finite_automata/RegisterOperation.hpp>
#include <log_surgeon/finite_automata/StateType.hpp>

namespace log_surgeon::finite_automata {
template <StateType state_type>
class DfaState;
Expand Down
6 changes: 3 additions & 3 deletions src/log_surgeon/finite_automata/Nfa.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
#include <utility>
#include <vector>

#include <fmt/format.h>
#include <fmt/ranges.h>

#include <log_surgeon/Constants.hpp>
#include <log_surgeon/finite_automata/Capture.hpp>
#include <log_surgeon/finite_automata/TagOperation.hpp>
Expand All @@ -20,9 +23,6 @@
#include <log_surgeon/types.hpp>
#include <log_surgeon/UniqueIdGenerator.hpp>

#include <fmt/format.h>
#include <fmt/ranges.h>

namespace log_surgeon::finite_automata {
/**
* Represents a Non-Deterministic Finite Automaton (NFA) designed to recognize a language based on
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
#include <utility>
#include <vector>

#include <log_surgeon/finite_automata/TagOperation.hpp>

#include <fmt/format.h>
#include <fmt/ranges.h>

#include <log_surgeon/finite_automata/TagOperation.hpp>

namespace log_surgeon::finite_automata {
/**
* Represents an NFA transition with a collection of tag operations to be performed during the
Expand Down
6 changes: 3 additions & 3 deletions src/log_surgeon/finite_automata/NfaState.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@
#include <utility>
#include <vector>

#include <fmt/format.h>
#include <fmt/ranges.h>

#include <log_surgeon/Constants.hpp>
#include <log_surgeon/finite_automata/NfaSpontaneousTransition.hpp>
#include <log_surgeon/finite_automata/StateType.hpp>
#include <log_surgeon/finite_automata/TagOperation.hpp>
#include <log_surgeon/finite_automata/UnicodeIntervalTree.hpp>
#include <log_surgeon/types.hpp>

#include <fmt/format.h>
#include <fmt/ranges.h>

namespace log_surgeon::finite_automata {
template <StateType state_type>
class NfaState;
Expand Down
10 changes: 5 additions & 5 deletions src/log_surgeon/finite_automata/RegexAST.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@
#include <utility>
#include <vector>

#include <log_surgeon/Constants.hpp>
#include <log_surgeon/finite_automata/Capture.hpp>
#include <log_surgeon/finite_automata/TagOperation.hpp>
#include <log_surgeon/finite_automata/UnicodeIntervalTree.hpp>

#include <fmt/format.h>
#include <fmt/ranges.h>
#include <fmt/xchar.h>
#include <gsl/pointers>

#include <log_surgeon/Constants.hpp>
#include <log_surgeon/finite_automata/Capture.hpp>
#include <log_surgeon/finite_automata/TagOperation.hpp>
#include <log_surgeon/finite_automata/UnicodeIntervalTree.hpp>

namespace log_surgeon::finite_automata {
template <typename TypedNfaState>
class Nfa;
Expand Down
4 changes: 2 additions & 2 deletions src/log_surgeon/finite_automata/RegisterOperation.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
#include <optional>
#include <string>

#include <log_surgeon/types.hpp>

#include <fmt/format.h>

#include <log_surgeon/types.hpp>

namespace log_surgeon::finite_automata {
/**
* Represents a register operation:
Expand Down
4 changes: 2 additions & 2 deletions src/log_surgeon/finite_automata/TagOperation.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
#include <string>
#include <tuple>

#include <log_surgeon/types.hpp>

#include <fmt/format.h>

#include <log_surgeon/types.hpp>

namespace log_surgeon::finite_automata {
enum class TagOperationType : uint8_t {
Set,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
#include <variant>
#include <vector>

#include <log_surgeon/wildcard_query_parser/StaticQueryToken.hpp>
#include <log_surgeon/wildcard_query_parser/VariableQueryToken.hpp>

#include <fmt/format.h>
#include <fmt/ranges.h>

#include <log_surgeon/wildcard_query_parser/StaticQueryToken.hpp>
#include <log_surgeon/wildcard_query_parser/VariableQueryToken.hpp>

using std::string;
using std::strong_ordering;
using std::vector;
Expand Down
4 changes: 2 additions & 2 deletions tests/test-schema.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ using RegexASTGroupByte
= log_surgeon::finite_automata::RegexASTGroup<log_surgeon::finite_automata::ByteNfaState>;
using RegexASTLiteralByte
= log_surgeon::finite_automata::RegexASTLiteral<log_surgeon::finite_automata::ByteNfaState>;
using RegexASTMultiplicationByte = log_surgeon::finite_automata::RegexASTMultiplication<
log_surgeon::finite_automata::ByteNfaState>;
using RegexASTMultiplicationByte = log_surgeon::finite_automata::
RegexASTMultiplication<log_surgeon::finite_automata::ByteNfaState>;

/**
* @ingroup unit_tests_schema
Expand Down
Loading