Run clang-format on all of our plugin test c++ files

This commit is contained in:
Tim Wojtulewicz 2022-06-27 16:28:50 -07:00
parent b59bfe5558
commit dc65b6248c
29 changed files with 400 additions and 336 deletions

View file

@ -1,9 +1,10 @@
#include "Foo.h"
#include "events.bif.h"
#include <zeek/file_analysis/Manager.h>
#include <zeek/file_analysis/File.h>
#include <zeek/file_analysis/Manager.h>
#include "events.bif.h"
using namespace btest::plugin::Demo_Foo;
@ -12,15 +13,15 @@ Foo::Foo(zeek::RecordValPtr args, zeek::file_analysis::File* file)
{
}
zeek::file_analysis::Analyzer* Foo::Instantiate(zeek::RecordValPtr args, zeek::file_analysis::File* file)
zeek::file_analysis::Analyzer* Foo::Instantiate(zeek::RecordValPtr args,
zeek::file_analysis::File* file)
{
return new Foo(std::move(args), file);
}
bool Foo::DeliverStream(const u_char* data, uint64_t len)
{
zeek::event_mgr.Enqueue(foo_piece,
GetFile()->ToVal(),
zeek::event_mgr.Enqueue(foo_piece, GetFile()->ToVal(),
zeek::make_intrusive<zeek::StringVal>(new zeek::String(data, len, 0)));
return true;
}
return true;
}

View file

@ -1,16 +1,21 @@
#include "Plugin.h"
#include "Foo.h"
#include "Plugin.h"
#include "file_analysis/Component.h"
#include "file_analysis/File.h"
namespace btest::plugin::Demo_Foo { Plugin plugin; }
namespace btest::plugin::Demo_Foo
{
Plugin plugin;
}
using namespace btest::plugin::Demo_Foo;
zeek::plugin::Configuration Plugin::Configure()
{
AddComponent(new zeek::file_analysis::Component("Foo", btest::plugin::Demo_Foo::Foo::Instantiate));
AddComponent(
new zeek::file_analysis::Component("Foo", btest::plugin::Demo_Foo::Foo::Instantiate));
zeek::plugin::Configuration config;
config.name = "Demo::Foo";