-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCodeIqConfig.java
More file actions
98 lines (72 loc) · 2.3 KB
/
Copy pathCodeIqConfig.java
File metadata and controls
98 lines (72 loc) · 2.3 KB
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
package io.github.randomcodespace.iq.config;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
/**
* Configuration properties for OSSCodeIQ, bound to the "codeiq" prefix.
*/
@Configuration
@ConfigurationProperties(prefix = "codeiq")
public class CodeIqConfig {
/** Root path of the codebase to analyze. */
private String rootPath = ".";
/** Cache directory name (legacy name kept for backward compatibility). */
private String cacheDir = ".code-intelligence";
/** Maximum traversal depth for graph queries. */
private int maxDepth = 10;
/** Maximum radius for ego graph queries. */
private int maxRadius = 10;
/** Batch size for file processing during indexing (files per H2 flush). */
private int batchSize = 500;
/** Graph configuration sub-properties. */
private Graph graph = new Graph();
public static class Graph {
private String path = ".osscodeiq/graph.db";
public String getPath() { return path; }
public void setPath(String path) { this.path = path; }
}
/** Service name tag for multi-repo graph mode. */
private String serviceName;
// --- Getters and Setters ---
public String getRootPath() {
return rootPath;
}
public void setRootPath(String rootPath) {
this.rootPath = rootPath;
}
public String getCacheDir() {
return cacheDir;
}
public void setCacheDir(String cacheDir) {
this.cacheDir = cacheDir;
}
public int getMaxDepth() {
return maxDepth;
}
public void setMaxDepth(int maxDepth) {
this.maxDepth = maxDepth;
}
public int getMaxRadius() {
return maxRadius;
}
public void setMaxRadius(int maxRadius) {
this.maxRadius = maxRadius;
}
public int getBatchSize() {
return batchSize;
}
public void setBatchSize(int batchSize) {
this.batchSize = Math.max(1, batchSize);
}
public String getServiceName() {
return serviceName;
}
public void setServiceName(String serviceName) {
this.serviceName = serviceName;
}
public Graph getGraph() {
return graph;
}
public void setGraph(Graph graph) {
this.graph = graph;
}
}