{"id":15494265,"url":"https://github.com/andyglow/scaladoc","last_synced_at":"2025-04-22T20:23:10.382Z","repository":{"id":39849407,"uuid":"257731760","full_name":"andyglow/scaladoc","owner":"andyglow","description":"Deps-Free Scaladoc AST, Parser and Macro-based Extractor and Compiler Plugin to carry over","archived":false,"fork":false,"pushed_at":"2025-03-17T14:07:44.000Z","size":166,"stargazers_count":2,"open_issues_count":5,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-29T18:36:29.163Z","etag":null,"topics":["ast","compiler-plugin","parser","scala","scaladoc"],"latest_commit_sha":null,"homepage":"","language":"Scala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/andyglow.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-04-21T22:36:33.000Z","updated_at":"2025-03-17T14:07:48.000Z","dependencies_parsed_at":"2023-02-15T23:00:45.405Z","dependency_job_id":"832b4efc-c29c-4612-b7e5-fccb1dacf077","html_url":"https://github.com/andyglow/scaladoc","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andyglow%2Fscaladoc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andyglow%2Fscaladoc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andyglow%2Fscaladoc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andyglow%2Fscaladoc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andyglow","download_url":"https://codeload.github.com/andyglow/scaladoc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250316542,"owners_count":21410560,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ast","compiler-plugin","parser","scala","scaladoc"],"created_at":"2024-10-02T08:12:57.485Z","updated_at":"2025-04-22T20:23:10.348Z","avatar_url":"https://github.com/andyglow.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"#### WORK IS STILL PRIMARILY IN PROGRESS, BUT...\n\n# Scaladoc\n\n[![Build Status](https://cloud.drone.io/api/badges/andyglow/scaladoc/status.svg)](https://cloud.drone.io/andyglow/scaladocx)\n[![codecov](https://codecov.io/gh/andyglow/scaladocx/branch/master/graph/badge.svg)](https://codecov.io/gh/andyglow/scaladocx)\n![Sonatype Nexus (Releases)](https://img.shields.io/nexus/r/com.github.andyglow/scaladoc-ast_2.11?nexusVersion=2\u0026server=https%3A%2F%2Foss.sonatype.org)\n[![mvn: 2.11](https://img.shields.io/badge/dynamic/json.svg?label=mvn%3A%202.11\u0026query=%24.response.docs%5B0%5D.latestVersion\u0026url=https%3A%2F%2Fsearch.maven.org%2Fsolrsearch%2Fselect%3Fq%3Dscaladoc-ast_2.13%26start%3D0%26rows%3D1)](https://search.maven.org/artifact/com.github.andyglow/scaladoc-ast_2.11/)\n[![mvn: 2.12](https://img.shields.io/badge/dynamic/json.svg?label=mvn%3A%202.12\u0026query=%24.response.docs%5B0%5D.latestVersion\u0026url=https%3A%2F%2Fsearch.maven.org%2Fsolrsearch%2Fselect%3Fq%3Dscaladoc-ast_2.13%26start%3D0%26rows%3D1)](https://search.maven.org/artifact/com.github.andyglow/scaladoc-ast_2.12/)\n[![mvn: 2.13](https://img.shields.io/badge/dynamic/json.svg?label=mvn%3A%202.13\u0026query=%24.response.docs%5B0%5D.latestVersion\u0026url=https%3A%2F%2Fsearch.maven.org%2Fsolrsearch%2Fselect%3Fq%3Dscaladoc-ast_2.13%26start%3D0%26rows%3D1)](https://search.maven.org/artifact/com.github.andyglow/scaladoc-ast_2.13/)\n\n\nThis project aims to provide comprehensive toolset for scaladoc manipulations. \n- Scaladoc AST (Tags, Markdown) \n- Parser\n- Compiler Plugin that can be used to embed scaladocs of classes into classes bytecode so this can be reused later on\n- Extractor that can be used to extract scaladocs for class from\n  - attachments (see scala macro for attachments)\n  - class bytecode\n  - source file\n\n\u003e Original `Scaladoc` [Documentation link](https://docs.scala-lang.org/overviews/scaladoc/for-library-authors.html)\n \n## Scaladoc AST\nThis Scaladoc model allows user to have pretty detailed view on class description.\nIt covers not only scaladoc tags but also recognizes markdown markup if used for certain type of tags. \n\nHere is the model. \n```\nSpan     = PlainText (String)\n         | Monospace (String)\n         | Italic (String)\n         | Bold (String)\n         | Underline (String)\n         | Superscript (String)\n         | Subscript (String)\n         | Link (String)\n         | CodeBlock (String)\n\nMarkup   = Span\n         | Heading (Level String)\n         | Paragraph (List Span)\n         | Document (List Markup)\n\nTag      = Description       (Markup)       \n         | Constructor       (Markup)       \n         | Param             (String Markup)\n         | TypeParam         (String Markup)\n         | Returns           (Markup)       \n         | Throws            (String Markup)\n         | See               (Markup)\n         | Note              (Markup)\n         | Example           (Markup)\n         | UseCase           (Markup)\n         | Author            (String)\n         | Version           (String)\n         | Since             (String)\n         | Todo              (Markup)\n         | Deprecated        (Markup)\n         | Migration         (Markup)\n         | Group             (String)\n         | GroupName         (String String)\n         | GroupDescription  (String Markup)\n         | GroupPriority     (String Int)\n         | Documentable\n         | InheritDoc\n         | OtherTag          (String Markup)\n    \nScaladoc = List Tag\n```\n\n## Parser\nParser is just parser. Takes text and either gives you parsed model or an error.\n```scala\nimport scaladoc._\n\nval text = \"\"\"/** = Title =\n             |  *\n             |  * Description\n             |  *\n             |  * @param a Param A\n             |  * @param b Param B\n             |  */\n             |\"\"\".stripMargin\n\nval scaladoc = Scaladoc fromString text\n```\n## Compiler plugin\nIn scala world we got used to the idea that pretty much anything we can derive\nout of whatever we have - case classes (product), sealed traits (sum), etc. \nAnd that is cool. But sometimes you need more, you want tour models to be documented and moreover, \nthat documentation to be distributed alongside with the bytecode and can be used by other \ntools that derives something. \n\nLike tools that derives json schemas, avro schemas, swagger, openapi, etc. could use that info \nto enrich resulted schemas with titles, descriptions, etc based on only scaladoc.\n\nSo what this plugin does is\n- validate scaladoc\n- packs it into java annotation so that it could be carried over\n\n## Extractor\nThis guy is used to extract scaladoc information from specified type.\nIt will inspect all possible places to get the job done, it will check attachments, \njava annotations and lastly source code (if available) to provide your tool with extracted scaladoc.\n\n```scala\nimport scaladoc._\n\nval scaladoc = Scaladoc.of[Foo]\n``` \n\n## Usage\n\nFor AST, Parser and Extractor please add following two lines into your `build.sbt`\n```sbt\nlibraryDependencies += \"com.github.andyglow\" %% \"scaladoc-ast\"    % \"\u003cversion\u003e\"\nlibraryDependencies += \"com.github.andyglow\" %% \"scaladoc-parser\" % \"\u003cversion\u003e\"\n```\n\nFor scaladoc embedding functionality, please consider adding these lines into your `build.sbt`\n```sbt\nautoCompilerPlugins := true\n\nlibraryDependencies += compilerPlugin(\"com.github.andyglow\" % (\"scaladoc-compiler-plugin_\" + scalaVersion.value) % \"\u003cversion\u003e\")\nlibraryDependencies += \"com.github.andyglow\" %% \"scaladoc-parser\" % \"\u003cversion\u003e\" % Provided\nlibraryDependencies += \"com.github.andyglow\" %% \"scaladoc-ast\"    % \"\u003cversion\u003e\"\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandyglow%2Fscaladoc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandyglow%2Fscaladoc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandyglow%2Fscaladoc/lists"}