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

Make private linters support parameters #1512

Closed
chenlujjj opened this issue Nov 17, 2020 · 6 comments · Fixed by #3887
Closed

Make private linters support parameters #1512

chenlujjj opened this issue Nov 17, 2020 · 6 comments · Fixed by #3887
Assignees
Labels
enhancement New feature or improvement linter: custom About custom/private linters

Comments

@chenlujjj
Copy link

Is your feature request related to a problem? Please describe.
I'm working on a custom private linter which checks that if main.go has some specific imports from our company's code base. It would be nice if I can config the imports names in settings like other public linters. Now I have to hard code.

Describe the solution you'd like
The config file may look like this (part of it):

linters:
  enable:
    - gocheckimports

linters-settings:
 custom:
  gocheckimports:
   path: ./gocheckimports.so
   description: check imports
   settings:
     key1: value1
     key2: value2
@chenlujjj chenlujjj added the enhancement New feature or improvement label Nov 17, 2020
@ldez ldez added the linter: custom About custom/private linters label Feb 13, 2021
@dshemin
Copy link

dshemin commented Oct 13, 2021

Are there any updates?

@chenlujjj
Copy link
Author

@dshemin Actually I made a workaround, port golangci-lint code and integrate the custom linter into it directly

@dshemin
Copy link

dshemin commented Oct 13, 2021

Yes, this is an option. But I think will be better to have an ability to set up custom linters through configuration file without integrated them into golangci-lint.

@stale
Copy link

stale bot commented Nov 13, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale No recent correspondence or work activity label Nov 13, 2022
@pohly
Copy link
Contributor

pohly commented Nov 13, 2022

This is still relevant.

@stale stale bot removed the stale No recent correspondence or work activity label Nov 13, 2022
@ldez ldez self-assigned this Jun 4, 2023
@ldez
Copy link
Member

ldez commented Jun 4, 2023

I created a PR on this topics: #3887

Feedback is welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or improvement linter: custom About custom/private linters
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants