open Common type config_file = { basedir : int option ; } let ignored_packages = ref [] let default = { basedir = None } let config_cache = Hashtbl.create 16 let read dir = try Hashtbl.find config_cache dir with Not_found -> try let file_name = dir ^ "/.perl_checker" in let fh = open_in file_name in let config = fold_lines (fun config line -> match words line with | [ "Basedir"; ".." ] -> { config with basedir = Some 1 } | [ "Basedir"; "../.." ] -> { config with basedir = Some 2 } | [] -> config (* blank line *) | [ "Ignore"; pkg ] | [ pkg ] (* the deprecated form *) -> lpush ignored_packages pkg; config | _ -> prerr_endline (Printf.sprintf "bad line \"%s\" in %s" line file_name); config ) default fh in Hashtbl.add config_cache dir config ; if !Flags.verbose then print_endline_flush ("reading config file " ^ file_name); config with Sys_error _ -> default let rec read_any dir depth = if depth = 0 then () else let _ = read dir in read_any (updir dir 1) (depth - 1)
aboutsummaryrefslogtreecommitdiffstats
path: root/tests/notification/fixtures/services_notification.yml
blob: c83d8bd323539b8bf6aa3d683c015fda49cfe3fc (plain)
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76