MCPcopy Index your code
hub / github.com/wavetermdev/waveterm / CountCustomSettings

Function CountCustomSettings

pkg/wconfig/settingsconfig.go:983–1000  ·  view source on GitHub ↗

CountCustomSettings returns the number of settings in the user's settings file. This excludes telemetry:enabled and autoupdate:channel which don't count as customizations.

()

Source from the content-addressed store, hash-verified

981// CountCustomSettings returns the number of settings in the user's settings file.
982// This excludes telemetry:enabled and autoupdate:channel which don't count as customizations.
983func CountCustomSettings() int {
984 // Load user settings
985 userSettings, _ := ReadWaveHomeConfigFile("settings.json")
986 if userSettings == nil {
987 return 0
988 }
989
990 // Count all keys except telemetry:enabled and autoupdate:channel
991 count := 0
992 for key := range userSettings {
993 if key == "telemetry:enabled" || key == "autoupdate:channel" {
994 continue
995 }
996 count++
997 }
998
999 return count
1000}

Callers 1

updateTelemetryCountsFunction · 0.92

Calls 1

ReadWaveHomeConfigFileFunction · 0.85

Tested by

no test coverage detected