forked from lightningnetwork/lnd
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Ll #169
Closed
Closed
Ll #169
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In this commit, we copy the implementation of the golangci-lint lll linter which we currently use in our CI flow during the `make lint` check. This commit copies the code mostly as is (the only exception being the line which trims white space before checking if a line starts with "import"), and formats it to fit our codebase guidelines. A test is also added so that we can be sure that the following commits which adjust the implementation have the intended results. The custom linter is put into its own module as this is requied by the `golangci-lint custom` when building the custom linter binary which includes the plugin.
This commit introduces the `LLPlugin` type and converts the existing lll code such that the LLPlugin implements the register.LinterPlugin interface. This will allow us to plug it into golangci-linter as a plugin.
This commit adds a feature to our custom lll linter which will ignore log lines (both single and multi-lined log lines) for the lll linter.
Add this file both to the main LND directory so that devs can use it for local linter runs and also add it to the `tools` directory so that the docker environment used to run the linter in CI has access to it. A custom linter binary can be built via `golangci-lint custom`. This will pull in and register all the plugins listed in the new config file when building the new binary. The new binary can then be run using `custom-gcl run`.
Find and replace all nolint instances refering to the `lll` linter and replace with `ll` which is the name of our custom version of the `lll` linter which can be used to ignore log lines during linting. The next commit will do the configuration of the custom linter and disable the default one.
Pull Request Test Coverage Report for Build 12082691165Details
💛 - Coveralls |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Change Description
Description of change / link to associated issue.
Steps to Test
Steps for reviewers to follow to test the change.
Pull Request Checklist
Testing
Code Style and Documentation
[skip ci]
in the commit message for small changes.📝 Please see our Contribution Guidelines for further guidance.