Skip to content

Commit

Permalink
docs: improve forbidigo pattern examples for built-in functions (#5116)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandear authored Nov 8, 2024
1 parent 8c0c515 commit b46ad10
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .golangci.next.reference.yml
Original file line number Diff line number Diff line change
Expand Up @@ -538,8 +538,8 @@ linters-settings:
# Forbid the following identifiers (list of regexp).
# Default: ["^(fmt\\.Print(|f|ln)|print|println)$"]
forbid:
# Builtin function:
- ^print.*$
# Built-in bootstrapping functions.
- ^print(ln)?$
# Optional message that gets included in error reports.
- p: ^fmt\.Print.*$
msg: Do not commit print statements.
Expand Down
4 changes: 2 additions & 2 deletions .golangci.reference.yml
Original file line number Diff line number Diff line change
Expand Up @@ -535,8 +535,8 @@ linters-settings:
# Forbid the following identifiers (list of regexp).
# Default: ["^(fmt\\.Print(|f|ln)|print|println)$"]
forbid:
# Builtin function:
- ^print.*$
# Built-in bootstrapping functions.
- ^print(ln)?$
# Optional message that gets included in error reports.
- p: ^fmt\.Print.*$
msg: Do not commit print statements.
Expand Down
2 changes: 1 addition & 1 deletion jsonschema/golangci.jsonschema.json
Original file line number Diff line number Diff line change
Expand Up @@ -1018,7 +1018,7 @@
"forbid": {
"description": "List of identifiers to forbid (written using `regexp`)",
"type": "array",
"examples": ["^print.*$"],
"examples": ["^print(ln)?$"],
"items": {
"anyOf": [
{
Expand Down
2 changes: 1 addition & 1 deletion jsonschema/golangci.next.jsonschema.json
Original file line number Diff line number Diff line change
Expand Up @@ -1020,7 +1020,7 @@
"forbid": {
"description": "List of identifiers to forbid (written using `regexp`)",
"type": "array",
"examples": ["^print.*$"],
"examples": ["^print(ln)?$"],
"items": {
"anyOf": [
{
Expand Down

0 comments on commit b46ad10

Please sign in to comment.