Skip to content

Commit

Permalink
Remove unnecesary schema validations in user config
Browse files Browse the repository at this point in the history
  • Loading branch information
karimkhaleel authored and stefanhaller committed May 19, 2024
1 parent 6fcb7eb commit af842e4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
6 changes: 3 additions & 3 deletions pkg/config/user_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ type PagingConfig struct {
// diff-so-fancy
// delta --dark --paging=never
// ydiff -p cat -s --wrap --width={{columnWidth}}
Pager PagerType `yaml:"pager" jsonschema:"minLength=1"`
Pager PagerType `yaml:"pager"`
// If true, Lazygit will use whatever pager is specified in `$GIT_PAGER`, `$PAGER`, or your *git config*. If the pager ends with something like ` | less` we will strip that part out, because less doesn't play nice with our rendering approach. If the custom pager uses less under the hood, that will also break rendering (hence the `--paging=never` flag for the `delta` pager).
UseConfig bool `yaml:"useConfig"`
// e.g. 'difft --color=always'
Expand Down Expand Up @@ -294,9 +294,9 @@ type LogConfig struct {

type CommitPrefixConfig struct {
// pattern to match on. E.g. for 'feature/AB-123' to match on the AB-123 use "^\\w+\\/(\\w+-\\w+).*"
Pattern string `yaml:"pattern" jsonschema:"example=^\\w+\\/(\\w+-\\w+).*,minLength=1"`
Pattern string `yaml:"pattern" jsonschema:"example=^\\w+\\/(\\w+-\\w+).*"`
// Replace directive. E.g. for 'feature/AB-123' to start the commit message with 'AB-123 ' use "[$1] "
Replace string `yaml:"replace" jsonschema:"example=[$1] ,minLength=1"`
Replace string `yaml:"replace" jsonschema:"example=[$1]"`
}

type UpdateConfig struct {
Expand Down
9 changes: 2 additions & 7 deletions schema/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,6 @@
},
"pager": {
"type": "string",
"minLength": 1,
"description": "e.g.\ndiff-so-fancy\ndelta --dark --paging=never\nydiff -p cat -s --wrap --width={{columnWidth}}",
"default": "",
"examples": [
Expand Down Expand Up @@ -543,18 +542,16 @@
"properties": {
"pattern": {
"type": "string",
"minLength": 1,
"description": "pattern to match on. E.g. for 'feature/AB-123' to match on the AB-123 use \"^\\\\w+\\\\/(\\\\w+-\\\\w+).*\"",
"examples": [
"^\\w+\\/(\\w+-\\w+).*"
]
},
"replace": {
"type": "string",
"minLength": 1,
"description": "Replace directive. E.g. for 'feature/AB-123' to start the commit message with 'AB-123 ' use \"[$1] \"",
"examples": [
"[$1] "
"[$1]"
]
}
},
Expand All @@ -567,18 +564,16 @@
"properties": {
"pattern": {
"type": "string",
"minLength": 1,
"description": "pattern to match on. E.g. for 'feature/AB-123' to match on the AB-123 use \"^\\\\w+\\\\/(\\\\w+-\\\\w+).*\"",
"examples": [
"^\\w+\\/(\\w+-\\w+).*"
]
},
"replace": {
"type": "string",
"minLength": 1,
"description": "Replace directive. E.g. for 'feature/AB-123' to start the commit message with 'AB-123 ' use \"[$1] \"",
"examples": [
"[$1] "
"[$1]"
]
}
},
Expand Down

0 comments on commit af842e4

Please sign in to comment.