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

adds default config to enable all rules work out of the box #830

Merged
merged 2 commits into from
May 20, 2023

Conversation

chavacava
Copy link
Collaborator

Closes #749
By adding (very opinionated) defaults to the following rules:

  1. argument-limit (8)
  2. banned-characters (none)
  3. cognitive-complexity (7)
  4. cyclomatic (10)
  5. file-header (none)
  6. function-length (50 statements, 75 lines)
  7. function-result-limit (3)
  8. line-length-limit (80)
  9. max-public-structs (5)

These defaults will allow to run revive with a minimal configuration

ignoreGeneratedHeader = false
severity = "warning"
confidence = 0.8
errorCode = 0
warningCode = 0
enableAllRules = true

Copy link
Owner

@mgechev mgechev left a comment

Choose a reason for hiding this comment

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

I'm thinking that we should probably document the default values in the README. Otherwise LGTM!

@chavacava chavacava merged commit 2a1838f into master May 20, 2023
@chavacava chavacava deleted the fix-749 branch October 7, 2023 06:18
This pull request was closed.
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.

panics with enable-all-rules: true: not enough arguments for cyclomatic rule, expected 1, got 0
2 participants