-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
add detailed error config (#71) #142
add detailed error config (#71) #142
Conversation
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.
Thank you! LGTM with small remarks
@@ -323,14 +358,15 @@ object ScalafmtPlugin extends AutoPlugin { | |||
} | |||
|
|||
private def scalafmtTask = | |||
Def.task { | |||
Def.task { //TODO implement from here |
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.
What does this comment means?
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.
It was a reminder for myself. Sorry that I failed to check it before sending the commit. I'll remove it and send it with other changes.
@@ -100,11 +102,12 @@ object ScalafmtPlugin extends AutoPlugin { | |||
config: Path, | |||
log: Logger, | |||
writer: OutputStreamWriter, | |||
resolvers: Seq[Resolver] | |||
resolvers: Seq[Resolver], | |||
isDetailedError: Boolean |
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.
isDetailedError: Boolean | |
detailedErrorEnabled: Boolean |
more understandable name
@@ -62,6 +62,8 @@ object ScalafmtPlugin extends AutoPlugin { | |||
"Execute the scalafmtCheck task for all configurations in which it is enabled. " + | |||
"(By default this means the Compile and Test configurations.)" | |||
) | |||
val scalafmtDetailedError = | |||
settingKey[Boolean]("Log detailed error with stack trace, off by default") |
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.
Not sure about English grammar :)
May be Enables logging of detailed errors with stacktraces, disabled by default
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.
It sounds better :)
Compilation errors:
You can test plugin locally with |
After I fixed the complication issue, |
It's strange. Looks really like problem in local environment because I built plugin successfully just now. |
I couldn't find a solution yet. Still committed changes. Would you like me to squash commits? |
I tested it locally, everything is fine 👍🏻 |
You can add flag description here after v2.4.3 will be released |
Created a setting key as mentioned in issue #71 and passed it into tasks.