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

build+lnd+docs: start using slog and add commit_hash to log lines #9314

Merged
merged 13 commits into from
Dec 2, 2024

Commits on Nov 29, 2024

  1. tools/linters: Add copied golangci-lint lll linter code

    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.
    ellemouton committed Nov 29, 2024
    Configuration menu
    Copy the full SHA
    acbcb77 View commit details
    Browse the repository at this point in the history
  2. tools/linters: convert to LinterPlugin implementation

    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.
    ellemouton committed Nov 29, 2024
    Configuration menu
    Copy the full SHA
    9637a81 View commit details
    Browse the repository at this point in the history

Commits on Dec 2, 2024

  1. tools/linters: ignore log lines

    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.
    ellemouton committed Dec 2, 2024
    Configuration menu
    Copy the full SHA
    bd55b27 View commit details
    Browse the repository at this point in the history
  2. tools+.: add custom linter configuration file

    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`.
    ellemouton committed Dec 2, 2024
    Configuration menu
    Copy the full SHA
    88f5369 View commit details
    Browse the repository at this point in the history
  3. multi: rename nolint:lll to nolint:ll

    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.
    ellemouton committed Dec 2, 2024
    Configuration menu
    Copy the full SHA
    ab7aae0 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    c5d849e View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    a04f8df View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    efe08b8 View commit details
    Browse the repository at this point in the history
  7. build: Append commit hash to the main LND context

    It can be disabled via the new `logging.no-commit-hash` config option.
    ellemouton committed Dec 2, 2024
    Configuration menu
    Copy the full SHA
    755ad49 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    32fbea2 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    ed4279b View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    8862ce9 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    afbb9aa View commit details
    Browse the repository at this point in the history