-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Allow displaying only enabled rules in RulesCommand #1275
Conversation
7986fc7
to
369ccfa
Compare
Generated by 🚫 danger |
369ccfa
to
fe022c7
Compare
Currently, |
CHANGELOG.md
Outdated
@@ -23,6 +23,10 @@ | |||
[Marcelo Fabri](https://github.com/marcelofabri) | |||
[#1061](https://github.com/realm/SwiftLint/issues/1061) | |||
|
|||
* Allow displaying only enabled rules in `RulesCommand`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is missing two trailing whitespaces
return .success() | ||
} | ||
|
||
func ruleList(for options: RulesOptions, configuration: Configuration) -> RuleList { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be private
return { ruleID in | ||
self.init(ruleID: (ruleID.isEmpty ? nil : ruleID), configurationFile: configurationFile) | ||
} | ||
// swiftlint:disable line_length |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can use swiftlint:disable:next line_length
instead
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool, will change that
static func evaluate(_ mode: CommandMode) -> Result<RulesOptions, CommandantError<CommandantError<()>>> { | ||
return create | ||
<*> mode <| configOption | ||
<*> mode <| Argument(defaultValue: "", | ||
usage: "the rule identifier to display description for") | ||
<*> mode <| Switch(flag: Character("e"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can't you just use "e"
?. I expected this to work because of StringLiteralConvertible
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will try
fe022c7
to
f2bdd11
Compare
@marcelofabri fixed all your comments. Also, why are the trailing whitespaces needed at the end of each issue line in the Changelog? |
6ef8ac2
to
c81bcc1
Compare
Codecov Report
@@ Coverage Diff @@
## master #1275 +/- ##
=========================================
Coverage ? 81.75%
=========================================
Files ? 168
Lines ? 8363
Branches ? 0
=========================================
Hits ? 6837
Misses ? 1526
Partials ? 0
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please update Cartfile*
to reflect changes of Carthage/Checkouts/Commandant
?
The steps would be:
- Edit
Cartfile.private
to usemaster
ofCommandant
carthage update Commandant --no-build
Using `git clean -qdf` removes bundler folder
575e555
to
c0dc1b5
Compare
@norio-nomura @marcelofabri I've made the changes you requested. |
See #1270.
I've also updated the
Commandant
submodule to include the fix forSwitch
es included in this PR.