-
Notifications
You must be signed in to change notification settings - Fork 125
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
Turn cookbook recepies into examples #165
Conversation
docs_checker/check.scala
Outdated
@@ -1,5 +1,6 @@ | |||
// using scala 3.0.2 | |||
// using "org.scalameta::munit:0.7.29" | |||
// using com.lihaoyi:ammonite-ops_2.13:2.4.0 |
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.
Wouldn't os-lib (com.lihaoyi::os-lib:0.7.5
) be enough? Ammonite-ops is more or less deprecated IIRC.
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.
I just pick a random lib, I will change that
002ba9d
to
591d2a5
Compare
591d2a5
to
d7e0fc9
Compare
docs_checker/check.scala
Outdated
catch | ||
case e: Throwable => | ||
e.printStackTrace() | ||
Seq(TestCase(path, Some(e))) | ||
|
||
def checkFile(file: Path) = | ||
def ammPath(p: Path) = os.Path(p.toAbsolutePath) |
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.
I think, this method can be removed if you migrate from Java - Paths.*
to os.lib
.
docs_checker/check.scala
Outdated
|
||
val fakeLineMarker = "//fakeline" | ||
|
||
def checkFile(file: Path, dest: Option[Path]) = | ||
val content = Files.lines(file).iterator.asScala.toList |
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.
val content = Files.lines(file).iterator.asScala.toList | |
val content = os.read.lines(file) |
but, you have to replace Path
to os.Path
953c9fb
to
8c72bad
Compare
- add `fail` flag to make sure that command fail - skip frontmatter in generated readmefiles - migrate to os-lib
8c72bad
to
aa79fbc
Compare
No description provided.