Skip to content

Conversation

@justaugustus
Copy link
Member

@justaugustus justaugustus commented Mar 6, 2022

Fixes needed for #122.

From https://golangci-lint.run/usage/linters/#gci:

linters-settings:
  gci:
    # DEPRECATED: use `sections` and `prefix(github.com/org/project)` instead.
    local-prefixes: github.com/org/project
    # Checks that no inline Comments are present.
    # Default: false
    no-inline-comments: true
    # Checks that no prefix Comments(comment lines above an import) are present.
    # Default: false
    no-prefix-comments: true
    # Section configuration to compare against.
    # Section names are case-insensitive and may contain parameters in ().
    # Default: ["standard", "default"]
    sections:
      - standard # Captures all standard packages if they do not match another section.
      - default # Contains all imports that could not be matched to another section type.
      - comment(your text here) # Prints the specified indented comment.
      - newLine # Prints an empty line
      - prefix(github.com/org/project) # Groups all imports with the specified Prefix.
    # Separators that should be present between sections.
    # Default: ["newLine"]
    section-separators:
      - newLine

local-prefixes is deprecated, so we use sections here instead.

Because of a few things:

  • dependabot automatically updates golangci-lint-action versions
  • the gci linter warning is something that would've been caught with a newer version of golangci-lint

I've also dropped the version configuration, so it will default to using the latest version of golangci-lint when running CI.

Signed-off-by: Stephen Augustus [email protected]

@codecov
Copy link

codecov bot commented Mar 6, 2022

Codecov Report

Merging #126 (f777db7) into main (32323c1) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #126   +/-   ##
=======================================
  Coverage   66.39%   66.39%           
=======================================
  Files           1        1           
  Lines         247      247           
=======================================
  Hits          164      164           
  Misses         77       77           
  Partials        6        6           

...also, fixes some spacing issues in the config.

Signed-off-by: Stephen Augustus <[email protected]>
Copy link
Member

@naveensrinivasan naveensrinivasan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@justaugustus justaugustus merged commit d6456f6 into ossf:main Mar 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants