17#ifndef A11_FLOW_DISCOVER_H_
18#define A11_FLOW_DISCOVER_H_
26#include <absl/types/span.h>
Everything the tools know about the world, in one place.
Definition catalogue.h:119
std::string path
Definition main.cc:133
std::vector< std::string > roots
Definition main.cc:135
constexpr std::string_view kCatalogueFormat
The format field of the catalogue envelope.
Definition catalogue.h:169
Result Discover(absl::Span< const std::string > roots, const Options &options)
Every ActionSchema declared under roots, as a catalogue with origins.
Definition discover.cc:1406
constexpr std::string_view kScanFormat
The format field of the envelope a scan answers with, which is the catalogue's own: what a scan produ...
Definition discover.h:148
catalogue::Catalogue DiscoverInSource(std::string_view source, std::string_view path, Language language)
The same, for one file whose text is already in hand.
Definition discover.cc:1400
std::optional< Language > LanguageOf(std::string_view path)
The language a path's extension says it is, or nullopt for a file this does not read.
Definition discover.cc:1369
Language
A language an ActionSchema may be declared in.
Definition discover.h:81
Definition boundary.cc:32
Where an entry was declared, for an entry that was found by reading source.
Definition catalogue.h:63
What to read and what to leave alone.
Definition discover.h:92
std::vector< std::string > skip_directories
Directory names never descended into.
Definition discover.h:96
static Options Default()
Options with the defaults filled in.
Definition discover.cc:1389
size_t max_file_bytes
The largest file read.
Definition discover.h:101
size_t max_files
The most files read in one scan.
Definition discover.h:104
What a scan found, and what it did not read.
Definition discover.h:115
catalogue::Catalogue found
Definition discover.h:116
std::vector< std::string > too_large
Files skipped for being larger than max_file_bytes.
Definition discover.h:120
size_t files_read
Files opened and read to the end.
Definition discover.h:118
bool reached_file_limit
Whether max_files stopped the walk before it ran out of files.
Definition discover.h:122