summaryrefslogtreecommitdiffstats
path: root/yql/essentials/utils/docs/verification.h
blob: 0f9a2aa8214a7e13c4ef79b3f72e6f25489e956c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#pragma once

#include "page.h"
#include "link.h"

#include <util/generic/map.h>
#include <util/generic/set.h>

namespace NYql::NDocs {

enum class EFame {
    BadLinked,
    Unknown,
    Mentioned,
    Documented,
};

using TStatusesByName = TMap<TString, TString>;

using TFameReport = THashMap<EFame, TStatusesByName>;

struct TVerificationInput {
    TLinks Links;
    TPages Pages;
    TSet<TString> Names;
    TMap<TString, TString> ShortHands;
};

TFameReport Verify(TVerificationInput input);

double Coverage(const TFameReport& report, const TVector<TString>& names);

} // namespace NYql::NDocs