Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiline signature linter rule #933

Closed
jsimnz opened this issue Nov 8, 2022 · 3 comments
Closed

Multiline signature linter rule #933

jsimnz opened this issue Nov 8, 2022 · 3 comments
Labels
code quality Related to improving code quality

Comments

@jsimnz
Copy link
Member

jsimnz commented Nov 8, 2022

No description provided.

@jsimnz
Copy link
Member Author

jsimnz commented Nov 8, 2022

discussion: #931 (comment)

@shahzadlone
Copy link
Member

Prefer this:

func parseMutationOperationDefinition(
	schema gql.Schema,
	def *ast.OperationDefinition,
) (*request.OperationDefinition, error) {

Over this:

func parseMutationOperationDefinition(
	schema gql.Schema,
	def *ast.OperationDefinition) (*request.OperationDefinition, error) {
	

@shahzadlone shahzadlone added this to the DefraDB v0.4 milestone Nov 10, 2022
@shahzadlone shahzadlone added the code quality Related to improving code quality label Nov 10, 2022
@shahzadlone
Copy link
Member

I didn't find a linter that can do this, I found a linter that enforces a whitespace line after multi-line function signature but not what we want to achieve. Don't think writing a custom linter for this is worth it. The most helpful configuration to avoid this in general is provided by the GoLang editor where it enforces placing of ) on a new line after function parameter (An example of turning that option on can be found here: https://github.com/mittwald/golangci-lint-cfg).

@jsimnz jsimnz removed this from the DefraDB v0.4 milestone Nov 11, 2022
@shahzadlone shahzadlone removed their assignment Oct 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code quality Related to improving code quality
Projects
None yet
Development

No branches or pull requests

3 participants