[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#60805: [PATCH] Extend go-ts-mode with command to add docstring to fu
From: |
Eshel Yaron |
Subject: |
bug#60805: [PATCH] Extend go-ts-mode with command to add docstring to function |
Date: |
Sat, 21 Jan 2023 08:48:48 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
A quick thought from someone interested in using this new command:
IMO the current implementation is a bit too opinionated to be really
useful. Inserting the function's name at the beginning of the comment
is not always desired because different teams have different conventions
for doc comments, and sometimes you just want to add a nolint
directive[0] which again doesn't start with the function's name.
My suggestion is to add some way for users to customize/extend the
contents of the inserted doc comment. One option is to have a variable
that'll hold a function responsible for determining the text of the
comment. This variable can then default to a function that returns the
current Go function's name.
Thanks,
Eshel
[0] https://golangci-lint.run/usage/false-positives/#nolint-directive
- bug#60805: [PATCH] Extend go-ts-mode with command to add docstring to function, (continued)
- bug#60805: [PATCH] Extend go-ts-mode with command to add docstring to function, Eli Zaretskii, 2023/01/14
- bug#60805: [PATCH] Extend go-ts-mode with command to add docstring to function, Theodor Thornhill, 2023/01/14
- bug#60805: [PATCH] Extend go-ts-mode with command to add docstring to function, Evgeni Kolev, 2023/01/18
- bug#60805: [PATCH] Extend go-ts-mode with command to add docstring to function, Theodor Thornhill, 2023/01/18
- bug#60805: [PATCH] Extend go-ts-mode with command to add docstring to function, Evgeni Kolev, 2023/01/20
- bug#60805: [PATCH] Extend go-ts-mode with command to add docstring to function, Theodor Thornhill, 2023/01/20
- bug#60805: [PATCH] Extend go-ts-mode with command to add docstring to function, Evgeni Kolev, 2023/01/20
- bug#60805: [PATCH] Extend go-ts-mode with command to add docstring to function, Evgeni Kolev, 2023/01/20
- bug#60805: [PATCH] Extend go-ts-mode with command to add docstring to function, Theodor Thornhill, 2023/01/20
- bug#60805: [PATCH] Extend go-ts-mode with command to add docstring to function, Randy Taylor, 2023/01/20
- bug#60805: [PATCH] Extend go-ts-mode with command to add docstring to function,
Eshel Yaron <=
- bug#60805: [PATCH] Extend go-ts-mode with command to add docstring to function, Theodor Thornhill, 2023/01/21
- bug#60805: [PATCH] Extend go-ts-mode with command to add docstring to function, Evgeni Kolev, 2023/01/21
- bug#60805: [PATCH] Extend go-ts-mode with command to add docstring to function, Theodor Thornhill, 2023/01/21
- bug#60805: [PATCH] Extend go-ts-mode with command to add docstring to function, Eshel Yaron, 2023/01/21
- bug#60805: [PATCH] Extend go-ts-mode with command to add docstring to function, Eshel Yaron, 2023/01/18