mirror of
https://github.com/sourcegraph/sourcegraph.git
synced 2026-02-06 16:51:55 +00:00
Remove unused settings and env vars (#58580)
Found while cleaning up sourcegraph.com
This commit is contained in:
parent
efc65f62de
commit
7cdadb80ab
@ -56,7 +56,6 @@ oci_image(
|
||||
"CODEINTEL_PGPORT": "5432",
|
||||
"CODEINTEL_PGSSLMODE": "disable",
|
||||
"CODEINTEL_PGUSER": "sg",
|
||||
"PUBLIC_REPO_REDIRECTS": "true",
|
||||
},
|
||||
tars = [":tar_frontend"],
|
||||
user = "sourcegraph",
|
||||
|
||||
@ -154,16 +154,16 @@ func TestMergeSettings(t *testing.T) {
|
||||
}, {
|
||||
name: "merge int",
|
||||
left: &schema.Settings{
|
||||
SearchContextLines: 0,
|
||||
CodeIntelligenceAutoIndexPopularRepoLimit: 1,
|
||||
SearchContextLines: 0,
|
||||
HistoryDefaultPageSize: 1,
|
||||
},
|
||||
right: &schema.Settings{
|
||||
SearchContextLines: 1,
|
||||
CodeIntelligenceAutoIndexPopularRepoLimit: 0, // This is the zero value, so will not override a previous non-zero value
|
||||
SearchContextLines: 1,
|
||||
HistoryDefaultPageSize: 0, // This is the zero value, so will not override a previous non-zero value
|
||||
},
|
||||
expected: &schema.Settings{
|
||||
SearchContextLines: 1,
|
||||
CodeIntelligenceAutoIndexPopularRepoLimit: 1, // This is the zero value, so will not override a previous non-zero value
|
||||
SearchContextLines: 1,
|
||||
HistoryDefaultPageSize: 1, // This is the zero value, so will not override a previous non-zero value
|
||||
},
|
||||
}, {
|
||||
name: "deep merge struct pointer",
|
||||
|
||||
@ -2229,8 +2229,6 @@ type Settings struct {
|
||||
CodeIntelMixPreciseAndSearchBasedReferences bool `json:"codeIntel.mixPreciseAndSearchBasedReferences,omitempty"`
|
||||
// CodeIntelTraceExtension description: Whether to enable trace logging on the extension.
|
||||
CodeIntelTraceExtension bool `json:"codeIntel.traceExtension,omitempty"`
|
||||
// CodeIntelligenceAutoIndexPopularRepoLimit description: Up to this number of repos are auto-indexed automatically. Ordered by star count.
|
||||
CodeIntelligenceAutoIndexPopularRepoLimit int `json:"codeIntelligence.autoIndexPopularRepoLimit,omitempty"`
|
||||
// ExperimentalFeatures description: Experimental features and settings.
|
||||
ExperimentalFeatures *SettingsExperimentalFeatures `json:"experimentalFeatures,omitempty"`
|
||||
// FileSidebarVisibleByDefault description: Whether the sidebar on the repo view should be open by default.
|
||||
@ -2326,7 +2324,6 @@ func (v *Settings) UnmarshalJSON(data []byte) error {
|
||||
delete(m, "codeIntel.disableSearchBased")
|
||||
delete(m, "codeIntel.mixPreciseAndSearchBasedReferences")
|
||||
delete(m, "codeIntel.traceExtension")
|
||||
delete(m, "codeIntelligence.autoIndexPopularRepoLimit")
|
||||
delete(m, "experimentalFeatures")
|
||||
delete(m, "fileSidebarVisibleByDefault")
|
||||
delete(m, "history.defaultPageSize")
|
||||
|
||||
@ -370,12 +370,6 @@
|
||||
"description": "The timeout (in milliseconds) for un-indexed search requests.",
|
||||
"type": "number"
|
||||
},
|
||||
"codeIntelligence.autoIndexPopularRepoLimit": {
|
||||
"description": "Up to this number of repos are auto-indexed automatically. Ordered by star count.",
|
||||
"type": "integer",
|
||||
"minimum": 0,
|
||||
"default": 0
|
||||
},
|
||||
"search.contextLines": {
|
||||
"description": "The default number of lines to show as context below and above search results. Default is 1.",
|
||||
"type": "integer",
|
||||
|
||||
Loading…
Reference in New Issue
Block a user