summaryrefslogtreecommitdiffstats
path: root/yql/essentials/utils/docs/verification.h
blob: 4eac54017f896fe14a5aaf71e89c6f8f97ac1132 (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