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

CI/lint: enable some "revive" rules #3041

Merged
merged 1 commit into from
May 31, 2024
Merged

CI/lint: enable some "revive" rules #3041

merged 1 commit into from
May 31, 2024

Conversation

mmetc
Copy link
Contributor

@mmetc mmetc commented May 31, 2024

argument-limit
Warns when a function receives more parameters than the maximum set by the rule's configuration.

bare-return
Warns on bare (a.k.a. naked) returns

context-as-argument
By convention, context.Context should be the first parameter of a function.

duplicated-imports
It is possible to unintentionally import the same package twice.

modifies-parameter
A function that modifies its parameters can be hard to understand. It can also be misleading if the arguments are passed by value by the caller.

redundant-import-alias
This rule warns on redundant import aliases.

unreachable-code
This rule spots and proposes to remove unreachable code.

@mmetc mmetc added this to the 1.6.3 milestone May 31, 2024
Copy link

@mmetc: There are no 'kind' label on this PR. You need a 'kind' label to generate the release automatically.

  • /kind feature
  • /kind enhancement
  • /kind refactoring
  • /kind fix
  • /kind chore
  • /kind dependencies
Details

I am a bot created to help the crowdsecurity developers manage community feedback and contributions. You can check out my manifest file to understand my behavior and what I can do. If you want to use this for your project, you can check out the BirthdayResearch/oss-governance-bot repository.

Copy link

@mmetc: There are no area labels on this PR. You can add as many areas as you see fit.

  • /area agent
  • /area local-api
  • /area cscli
  • /area appsec
  • /area security
  • /area configuration
Details

I am a bot created to help the crowdsecurity developers manage community feedback and contributions. You can check out my manifest file to understand my behavior and what I can do. If you want to use this for your project, you can check out the BirthdayResearch/oss-governance-bot repository.

@mmetc mmetc marked this pull request as ready for review May 31, 2024 08:32
Copy link

codecov bot commented May 31, 2024

Codecov Report

Attention: Patch coverage is 50.00000% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 52.39%. Comparing base (8501f45) to head (467f17d).

Files Patch % Lines
pkg/appsec/request.go 0.00% 1 Missing ⚠️
pkg/csplugin/hclog_adapter.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3041   +/-   ##
=======================================
  Coverage   52.38%   52.39%           
=======================================
  Files         280      280           
  Lines       35431    35431           
=======================================
+ Hits        18560    18563    +3     
+ Misses      15030    15028    -2     
+ Partials     1841     1840    -1     
Flag Coverage Δ
bats 40.07% <0.00%> (-0.01%) ⬇️
unit-linux 34.85% <50.00%> (+0.01%) ⬆️
unit-windows 30.99% <0.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

argument-limit
Warns when a function receives more parameters than the maximum set by the rule's configuration.

bare-return
Warns on bare (a.k.a. naked) returns

context-as-argument
By convention, context.Context should be the first parameter of a function.

duplicated-imports
It is possible to unintentionally import the same package twice.

modifies-parameter
A function that modifies its parameters can be hard to understand. It can also be misleading if the arguments are passed by value by the caller.

redundant-import-alias
This rule warns on redundant import aliases.

unreachable-code
This rule spots and proposes to remove unreachable code.
@mmetc mmetc merged commit 89d02e9 into master May 31, 2024
16 of 17 checks passed
@mmetc mmetc deleted the revive branch May 31, 2024 14:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants