Flutter Engine
 
Loading...
Searching...
No Matches
license_checker.h
Go to the documentation of this file.
1// Copyright 2013 The Flutter Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef FLUTTER_TOOLS_LICENSES_CPP_SRC_LICENSE_CHECKER_H_
6#define FLUTTER_TOOLS_LICENSES_CPP_SRC_LICENSE_CHECKER_H_
7
8#include <iosfwd>
9#include <string_view>
10#include <vector>
12#include "third_party/abseil-cpp/absl/status/status.h"
13
15 public:
16 struct Flags {
18 std::optional<std::string> root_package_name;
19 };
20
21 static const char* kHeaderLicenseRegex;
22 static std::vector<absl::Status> Run(std::string_view working_dir,
23 std::ostream& licenses,
24 const Data& data);
25 static std::vector<absl::Status> Run(std::string_view working_dir,
26 std::ostream& licenses,
27 const Data& data,
28 const Flags& flags);
29 static int Run(std::string_view working_dir,
30 std::ostream& licenses,
31 std::string_view data_dir,
32 const Flags& flags);
33 /// Run on a single file.
34 static int FileRun(std::string_view working_dir,
35 std::string_view full_path,
36 std::ostream& licenses,
37 std::string_view data_dir,
38 const Flags& flags);
39};
40
41#endif // FLUTTER_TOOLS_LICENSES_CPP_SRC_LICENSE_CHECKER_H_
static const char * kHeaderLicenseRegex
static int FileRun(std::string_view working_dir, std::string_view full_path, std::ostream &licenses, std::string_view data_dir, const Flags &flags)
Run on a single file.
static std::vector< absl::Status > Run(std::string_view working_dir, std::ostream &licenses, const Data &data)
Definition data.h:17
std::optional< std::string > root_package_name
std::shared_ptr< const fml::Mapping > data