-
Notifications
You must be signed in to change notification settings - Fork 8
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
refactor: make config options be consistent with the cli style #22
Conversation
Codecov Report
@@ Coverage Diff @@
## master #22 +/- ##
==========================================
- Coverage 91.08% 90.59% -0.50%
==========================================
Files 10 6 -4
Lines 303 287 -16
==========================================
- Hits 276 260 -16
+ Misses 19 17 -2
- Partials 8 10 +2
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
The config is not intended to used as config file. |
Though simplify Config struct for easier integration is good. For golangci-lint, they have their own config struct styles, so there must be a struct conversion in between: |
even not intended to used as config file, even it is not for end user. when the thing can be I know golangci-lint has its own config file or struct. I mean, for Developer Experience (DX)
something like |
Yes, it's good to use string slice over sets |
there's another thing, since we parse the rules our self, so there's failure.
then we can let the caller to determinate whether to panic or print an error message |
I think we can move those parts in |
and also,
we do not need to expose an |
it is better not move those to because thus, we will need introduce I do not think this is a good idea keep it in the |
it will b called only once (guarded in a sync.Once) |
I made a second commit, PTAL @timonwong |
Signed-off-by: Timon Wong <[email protected]>
Signed-off-by: Timon Wong <[email protected]>
Signed-off-by: Timon Wong <[email protected]>
Signed-off-by: Timon Wong <[email protected]>
Signed-off-by: Timon Wong <[email protected]>
f5e5cd7
to
2f4a6c6
Compare
simplify
Config
, make it consistent with the cli stylewhen users using the cli tool could just using a simple rule files,
there's no reason to make users in other tools config the linter in a harder way.
map[string]struct{}
is not a good struct for config file likejson
,yaml
etc.for example in yaml people will force to config like this:
but the whole thing they wanted is just: