mirror of
https://github.com/zeek/zeek.git
synced 2025-10-05 16:18:19 +00:00
Reformat Zeek in Spicy style
This largely copies over Spicy's `.clang-format` configuration file. The one place where we deviate is header include order since Zeek depends on headers being included in a certain order.
This commit is contained in:
parent
7b8e7ed72c
commit
f5a76c1aed
786 changed files with 131714 additions and 153609 deletions
|
@ -8,45 +8,41 @@
|
|||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
namespace zeek::detail
|
||||
{
|
||||
namespace zeek::detail {
|
||||
|
||||
// Script file we have already scanned (or are in the process of scanning).
|
||||
// They are identified by normalized canonical path.
|
||||
class ScannedFile
|
||||
{
|
||||
|
||||
class ScannedFile {
|
||||
public:
|
||||
ScannedFile(int arg_include_level, std::string arg_name, bool arg_skipped = false,
|
||||
bool arg_prefixes_checked = false);
|
||||
ScannedFile(int arg_include_level, std::string arg_name, bool arg_skipped = false,
|
||||
bool arg_prefixes_checked = false);
|
||||
|
||||
/**
|
||||
* Compares the canonical path of this file against every canonical path
|
||||
* in files_scanned and returns whether there's any match.
|
||||
*/
|
||||
bool AlreadyScanned() const;
|
||||
/**
|
||||
* Compares the canonical path of this file against every canonical path
|
||||
* in files_scanned and returns whether there's any match.
|
||||
*/
|
||||
bool AlreadyScanned() const;
|
||||
|
||||
int include_level;
|
||||
bool skipped; // This ScannedFile was @unload'd.
|
||||
bool prefixes_checked; // If loading prefixes for this file has been tried.
|
||||
std::string name;
|
||||
std::string canonical_path; // normalized, absolute path via std::filesystem::canonical()
|
||||
int include_level;
|
||||
bool skipped; // This ScannedFile was @unload'd.
|
||||
bool prefixes_checked; // If loading prefixes for this file has been tried.
|
||||
std::string name;
|
||||
std::string canonical_path; // normalized, absolute path via std::filesystem::canonical()
|
||||
|
||||
static auto constexpr canonical_stdin_path = "<stdin>";
|
||||
};
|
||||
static auto constexpr canonical_stdin_path = "<stdin>";
|
||||
};
|
||||
|
||||
extern std::list<ScannedFile> files_scanned;
|
||||
|
||||
struct SignatureFile
|
||||
{
|
||||
std::string file;
|
||||
std::optional<std::string> full_path;
|
||||
Location load_location;
|
||||
struct SignatureFile {
|
||||
std::string file;
|
||||
std::optional<std::string> full_path;
|
||||
Location load_location;
|
||||
|
||||
SignatureFile(std::string file);
|
||||
SignatureFile(std::string file, std::string full_path, Location load_location);
|
||||
};
|
||||
SignatureFile(std::string file);
|
||||
SignatureFile(std::string file, std::string full_path, Location load_location);
|
||||
};
|
||||
|
||||
extern std::vector<SignatureFile> sig_files;
|
||||
|
||||
} // namespace zeek::detail
|
||||
} // namespace zeek::detail
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue